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

REST API "limit" and "start" not working for ContentChild endpoint

    XMLWordPrintable

Details

    Description

      Summary

      According to https://docs.atlassian.com/confluence/REST/5.6/#d3e789, you can limit the response of rest calls with the limit parameter. However, this parameter is not working as the rest call will return the default value: 25.

      You can also set a start, but apparently, it will use it's default value too, which is 0.

      Steps to Reproduce

      1. Create more than 30 child pages. You can use the following cURL command:
        for ((i=1;i<=30;i++)) ; do  curl -v -u admin:admin -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d'{"type":"page","ancestors":[{"type":"page","id":<pageId>}],"title":'$i',"space":{"key":"<space_key>"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' "<confluence-url>/rest/api/content/?os_authType=basic";  done
        

        Replace the < > tags.

      2. Use the following URL:
        <confluence-url>/rest/api/content/<parent-page-id>/child?expand=page&start=5&limit=10
        

      Expected Results

      Confluence will show only 10 results, starting from the 5th entry.

      Actual Results

      Rest API will show 25 results starting from the 1st entry and no more. If you want to show 30 results(&limit=30) instead, it will still display just 25.

      Workaround

      No workarounds

      Attachments

        Activity

          People

            hrehioui Hasnae (Inactive)
            gviana Guilherme V. (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: