Content restrictions

Add restrictions

Changed on

Adds the supplied users and groups to the content's restrictions, preserving existing restrictions. Use read for viewing restrictions and update for editing restrictions. Omitted or empty user and group lists add no restrictions.

Permissions required: Permission to edit the content.

post/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 add restrictions to.

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 added.

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