REST API to get a list of restricted pages

XMLWordPrintable

    • 32
    • 30

      User Problem

      Currently, there are no API endpoints to list restricted pages. Using Admin key without UI is not supported either.

      While there is an endpoint to get restriction details, you must know the content details to call this API. If we could have the API to get the list, it will improve the usability.

      Suggested Solutions

      1. We have a new space API endpoint such as:
        api/spaces/{id}/restriction
        
      1. Call the API endpoint
        curl --request GET \
          --url 'https://your-domain.atlassian.net/wiki/rest/api/spaces/{id}/restriction' \
          --user 'email@example.com:<api_token>'
        
      1. If the user is not a space admin, the API fails with a 401 error.
      2. Obtain the response like below
        {"results":[
        {"id":"001","type":"page","status":"current","title":"Onlyme" ....},
        {"id":"002","type":"page","status":"current","title":"Onlyyou"....},
        ....
        {"id":"00X","type":"page","status":"current","title":"Onlythem"....},
        ],"start":X,"limit":25,"size":X"}
        

      Current Workarounds

      • Manually check restricted pages in each space one by one.

            Assignee:
            Ben Keene
            Reporter:
            Kaz Nobutani
            Votes:
            43 Vote for this issue
            Watchers:
            47 Start watching this issue

              Created:
              Updated: