Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-95272

REST API pagination (eg, /rest/api/space) returns more data than available

      Issue Summary

      This issue relates to general paginated results.

      Requesting data from an endpoint such as /rest/api/space or rest/api/content causes Confluence to return more data than available.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Request /rest/api/space to collect all of the spaces available without using ?expand parameter;
      2. Verify that Confluence returns the exact amount of spaces that exist in the instance;
      3. Now add the ?expand parameter, for example:
        1. https://fqdn/rest/api/space?expand=description.plain&limit=1&start=999

      Expected Results

      Using ?expand produces the same array as without it, except that it expands the required fields.

      Actual Results

      Using ?expand causes Confluence to keep returning data past the available amount, which breaks apps that loop through the resulting array.

      Workaround

      Currently there is no known workaround for this behavior. But if you have Comala Document management app and noticed that the REST calls are related to Comala like below:

      https://ConfluecneBaseURL/rest/cw/2/report/search?cql=awphasworkflow%3Dtrue%20AND%20space%20IN%20(%22TE%22)%20AND%20state%20IN%20 

      Then Comala Tech has shared few steps to lower the CPU usage. Basically, number of items to be displayed in the report should be 11 or less. Below are the steps recommended by Comala tech.

       

      1. Go to a page where you have the Document States Report macro failing
      2. Edit the page
      3. Edit the macro and modify the value of “Number of items to display” and set it to “11”
      4. Save the page
      5. Check if the report is rendered successfully

            [CONFSERVER-95272] REST API pagination (eg, /rest/api/space) returns more data than available

            No work has yet been logged on this issue.

              24ee36512d14 Sumitra Sahu (Inactive)
              resteves Rodrigo Heinzen
              Affected customers:
              45 This affects my team
              Watchers:
              64 Start watching this issue

                Created:
                Updated:
                Resolved: