Content restrictions

Update restrictions

Changed on

Updates restrictions for a piece of content. For each operation in the request, the supplied user and group lists replace the corresponding existing lists. Omitted operations and omitted user or group lists are preserved. An explicitly empty list ({"results": []} or []) clears that list.

Use read for viewing restrictions and update for editing restrictions. While content remains view restricted, an editor must also be able to view it. Removing an editor's read restriction while retaining their update restriction returns 400. Remove their update restriction too, or clear all read restrictions to remove direct viewing restrictions. Restrictions inherited from ancestors still apply.

Permissions required: Permission to edit the content.

put/wiki/rest/api/content/{id}/restriction

Request

  • Base URL
    https://your-domain.atlassian.net
  • URL
    https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction
  • Auth
    • HTTP basic
    • or OAuth 2
      Authorization code: https://auth.atlassian.com/authorize
      Token URL: https://auth.atlassian.com/oauth/token scopes: write:confluence-content

Path parameters

idstring required

The ID of the content to update restrictions for.

Query parameters

expandstring[]

A multi-value parameter indicating which properties of the content restrictions (returned in response) to expand.

  • restrictions.user returns the users that the restrictions apply to. Expanded by default.
  • restrictions.group returns the groups that the restrictions apply to. Expanded by default.
  • content returns the piece of content that the restrictions are applied to.

Request body

OR

Response

Returned if the requested restrictions are updated.

startinteger required
limitinteger required
sizeinteger required
restrictionsHashstring required

This property is used by the UI to figure out whether a set of restrictions has changed.

_linksGenericLinks required

Changes

    • breaking

      removed subschema #1 subschema #2 from the request body oneOf list

    • info

      added subschema #1 subschema #2 to the request body oneOf list

    • info

      added the non-success response with the status