Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-32276

[BOP] Display global user counts in /v3/accounts/{orgID}/users optionally

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      By this change new bool query parametr skipTotalCount was added for endpoint

      GET v3/accounts/{accountId}/users 

      the parametr is not mandatory and default value is false

      case 1: without skipTotalCount parametr (without change)

      request

      GET v3/accounts/{accountId}/users 

      response

      {
         "userCount" : 75,
         "users" : [
            {
               "username" : "insights-qa",
               "first_name" : "Insights",
               "is_active" : true,
               "is_internal" : false,
               "is_org_admin" : true,
               ... 

        case 2: with skipTotalCount=false (without change) = same as case 1

      request

      GET v3/accounts/{accountId}/users?skipTotalCount=false

      response

      {
         "userCount" : 75,
         "users" : [
            {
               "username" : "insights-qa",
               "first_name" : "Insights",
               "is_active" : true,
               "is_internal" : false,
               "is_org_admin" : true,
               ... 

      case 3: with skipTotalCount=true

      request

      GET v3/accounts/{accountId}/users?skipTotalCount=true

      response with userCount=0

      {
         "userCount" : 0,
         "users" : [
            {
               "username" : "insights-qa",
               "first_name" : "Insights",
               "is_active" : true,
               "is_internal" : false,
               "is_org_admin" : true,
               ... 

       

      Show
      By this change new bool query parametr skipTotalCount was added for endpoint GET v3/accounts/{accountId}/users the parametr is not mandatory and default value is false case 1: without skipTotalCount parametr (without change) request GET v3/accounts/{accountId}/users  response {     "userCount"  : 75,     "users"  : [       {           "username"  :  "insights-qa" ,           "first_name"  :  "Insights" ,           "is_active"  :  true ,           "is_internal"  :  false ,           "is_org_admin"  :  true ,          ...   case 2: with skipTotalCount=false (without change) = same as case 1 request GET v3/accounts/{accountId}/users?skipTotalCount= false response {     "userCount"  : 75,     "users"  : [       {           "username"  :  "insights-qa" ,           "first_name"  :  "Insights" ,           "is_active"  :  true ,           "is_internal"  :  false ,           "is_org_admin"  :  true ,          ... case 3: with skipTotalCount=true request GET v3/accounts/{accountId}/users?skipTotalCount= true response with userCount=0 {     "userCount" : 0,     "users" : [       {           "username" : "insights-qa" ,           "first_name" : "Insights" ,           "is_active" : true ,           "is_internal" : false ,           "is_org_admin" : true ,          ...  
    • Unset
    • No
    • Access & Management Sprint 87, Access & Management Sprint 88, Access & Management Sprint 89, Access & Management Sprint 90, Access & Management Sprint 91, Access & Management Sprint 92, Access & Management Sprint 93

      This ticket was created based on https://issues.redhat.com/browse/RHCLOUD-26655

      • To minimize making redundant requests to the IT service, we should introduce a parameter that prevents such calls for obtaining the global count[1]. This will result in a display of "0" instead.
      • The suggested name for this parameter is: skipTotalCount:true.
      • This modification needs to be implemented in the endpoint's code, the OpenAPI specification, and, where relevant, additional tests may need to be added.

       

      [1] https://gitlab.cee.redhat.com/insights-platform/backoffice-proxy/-/blob/master/routes/v3/accounts/%7BaccountId%7D/users.js#L13

              pcihalov@redhat.com Petra Cihalova
              lpichler@redhat.com Libor Pichler
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: