content/search API returns HTTP 200 with empty results array when paginating using _links.next cursor

XMLWordPrintable

    • Minor

      Issue Summary

      When paginating through the GET /wiki/rest/api/content/search endpoint using the _links.next cursor-based URL returned in the response, the API intermittently returns an HTTP 200 response with an empty results array and no subsequent _links.next link, even when more content exists in the space.

      Steps to Reproduce

      1. Authenticate using OAuth 2.0 against a Confluence Cloud instance
      2. Make an initial GET request to /wiki/rest/api/content/search with a CQL query targeting a large space, e.g.:
        cql=space = "LARGE_SPACE_HERE" and type in (page, blogpost)&limit=50
      3. Use the full _links.next URL from each response as-is to paginate through results
      4. After approximately 10–11 pages (~500 results), the API returns HTTP 200 with:
        • An empty results array ([])
        • No _links.next link despite the space containing significantly more content

      Expected Results

      The API should continue returning results until all matching content has been paginated through, with the final response returning the remaining items and no _links.next.

      Actual Results

      The API prematurely returns an HTTP 200 with an empty results array and no _links.next, silently truncating the paginated results mid-crawl. This causes consumers to miss a large portion of the space's content with no error signal.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Rishul Matta
              Reporter:
              Leonardo Grzybowski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: