Uploaded image for project: 'Atlassian Intelligence'
  1. Atlassian Intelligence
  2. AI-493

CQL rest api doesn't work when filter on blogpost and expand=content.space

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      As an anonymous user I can't get data from /wiki/rest/api/search?cql= when filtering on type=blogpost and expand=content.space (or any other content expand)

      Example: https://mariatestarprod.atlassian.net/wiki/rest/api/search?cql=type=blogpost&limit=5&start=0&expand=content.space

      However if we remove the expand it works: https://mariatestarprod.atlassian.net/wiki/rest/api/search?cql=type=blogpost&limit=5&start=0

      For pages the expand works as expected for anonymous users: https://mariatestarprod.atlassian.net/wiki/rest/api/search?cql=type=page&limit=5&start=0&expand=content.space

      Steps to Reproduce

      1. Make sure you have a space that is accessible for anonymous users.
      2. Add a blog post to the space
      3. As an anonymous user access this rest point /wiki/rest/api/search?cql=type=blogpost&limit=5&start=0&expand=content.space

      Expected Results

      The blog post with expanded data

      Actual Results

      A 500 error saying

       

      java.lang.IllegalArgumentException: start cannot be less than zero

       

      Workaround

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

              ywang2@atlassian.com Ying Wang
              rtalusan Ryan Talusan
              Votes:
              14 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: