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

When making CQL REST API calls on a parent page using the Confluence Admin account, pages that are restricted to not include the administrator account will not show in the API results.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a bug
    • Low
    • None
    • 7.10.2
    • None

    Description

      Issue Summary

      When making REST API calls using CQL to get a list of child pages from a parent page with a Confluence administrator account the results will exclude pages that are restricted from the administrator.

      Steps to Reproduce

      1. Create a parent page with several child pages as a normal user (not an admin)
      2. Restrict a child page one to exclude the admin account
      3. Initiate a REST API call on the parent page:
        example call: http://localhost:6747/c747/rest/api/content/search?cql=parent=1736735
        In this example, Howell's child page 1 is restricted from the admin, and Howell's child page 2 is not restricted

      Expected Results

      The results should include restricted pages as Confluence Admins can view all restricted pages in the UI

      Actual Results

      Running the example Call above http://localhost:6747/c747/rest/api/content/search?cql=parent=1736735

      When indicating the REST API call only the nonrestricted child page will show (this is the result across the board with CQL fields (parent, ancestor, creator, etc):

      {
          "results": [
              {
                  "id": "1736739",
                  "type": "page",
                  "status": "current",
                  "title": "Howell's child page 2",
                  "restrictions": {},
                  "_links": {
                      "webui": "/display/HOW/Howell%27s+child+page+2",
                      "tinyui": "/x/I4Aa",
                      "self": "http://localhost:6747/c747/rest/api/content/1736739"
                  },
                  "_expandable": {
                      "container": "",
                      "metadata": "",
                      "extensions": "",
                      "operations": "",
                      "children": "",
                      "history": "/rest/api/content/1736739/history",
                      "ancestors": "",
                      "body": "",
                      "version": "",
                      "descendants": "",
                      "space": "/rest/api/space/HOW"
                  }
              }
          ],
          "start": 0,
          "limit": 25,
          "size": 1,
          "cqlQuery": "parent=1736735",
          "searchDuration": 12,
          "totalSize": 1,
          "_links": {
              "self": "http://localhost:6747/c747/rest/api/content/search?cql=parent=1736735",
              "base": "http://localhost:6747/c747",
              "context": "/c747"
          }
      }
      

      Workaround

      Using a GET content call on an individual page that is restricted from a confluence administrator works, but is not ideal as this would have to be done individually for each child page and could get exhaustive if the goal is to get a list of child pages from a parent page.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dhowell@atlassian.com Derek Howell
            Votes:
            12 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: