Changing order of parameters in REST API gives incorrect search results

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.5.12
    • None
    • 1
    • Severity 3 - Minor
    • 1

      Problem

      In Confluence, if the order of query parameter is changed, wrong results are retreived

      Environment

      .
      Confluence 8.5.12

      Steps to Reproduce

      1. Create a Space in Confluence
      2. Create two or more pages under the same space
      3. Ensure that the page titles are unique and there is no commonality of words among them
      4. Assuming one of these three pages is title "Toyota"
      5. Search for this page using the following API:

      rest/api/content?spaceKey=<SPACE-KEY>&title=Toyota&expand=space,body.view,version,container"
      

      6. Search for the same page using the following:

      /rest/api/content?title=Toyota&spaceKey=<SPACE-KEY>&expand=history
      

      Expected Results

      Both the steps 5 and 6 should retrieve the page titled "Toyota"

      Actual Results

      For step 5 :All pages under the space are retrieved.
      For step 6 : Only the specific page is retrieved

      Workaround

      So changing the order of <Space-Key> and <Title> can change the results. The order, Spacekey first and Title next does not fetch the right results. The otherway around works correctly.

      Notes

            Assignee:
            Unassigned
            Reporter:
            Sathya Ganeshan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: