Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-35429

API documentation states the default per page is 1000

XMLWordPrintable

    • None
    • None
    • None
    • No Coverage

      Description of problem:

      The doc is sharing that the number of objects, by default, will be 1000, when not passing page or per_page. However, even when just calling the endpoint, the page and per_page will be already in place, forcing the result to be 20 objects, and not 1000.

       

      How reproducible:

      100%

      Is this issue a regression from an earlier version:

       

      Steps to Reproduce:

      1. Execute the curl command against the API endpoint

      # curl -s -u admin:redhat https://$(hostname)/api/hosts | python3 -m json.tool | head -n 20
      {
          "total": 15,
          "subtotal": 15,
          "page": 1,
          "per_page": 20,
          "search": null,
          "sort": {
              "by": null,
              "order": null
          },
          "results": [
              {
                  "ip": "10.8.30.134",
                  "ip6": "2620:52:0:800:250:56ff:feab:8132",
                  "last_report": null,
                  "mac": "00:50:56:ab:81:32",
                  "realm_id": null,
                  "realm_name": null,
                  "sp_mac": null,
                  "sp_ip": null, 

      2.

      3.

      Actual behavior:
      Note that we are not passing in the URL page and/or per_page, and the value it's already set, page = 1, and per_page = 20

       

      Expected behavior:
      Or Satellite should be returning 1000 objects, or (better option IMHO), we fix the document, removing such information.

       

      https://docs.redhat.com/en/documentation/red_hat_satellite/6.15/html-single/api_guide/index#sect-API-Guide-Using_Searches_with_Pagination_Control

       

      Business Impact / Additional info:

       

              Unassigned Unassigned
              rhn-support-wpinheir Waldirio Pinheiro
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: