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 when using ?expand parameter

    XMLWordPrintable

Details

    Description

      Issue Summary

      This issue relates to general paginated results.

      Requesting data from an endpoint such as /rest/api/space or rest/api/content with ?expand parameter 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. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              24ee36512d14 Sumitra Sahu
              resteves Rodrigo Heinzen
              Votes:
              25 Vote for this issue
              Watchers:
              38 Start watching this issue

              Dates

                Created:
                Updated: