This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object.

The following combinations of operation.key and operation.target values are valid for the operation object:

'create': 'page', 'blogpost', 'comment', 'attachment'
'read': 'space'
'delete': 'page', 'blogpost', 'comment', 'attachment', 'space'
'export': 'space'
'administer': 'space'
'archive': 'page'
'restrict_content': 'space'

For example, to enable Delete Own permission, set the operation object to the following:

"operation": {
"key": "delete",
"target": "space"
}

To enable Add/Delete Restrictions permissions, set the operation object to the following:

"operation": {
"key": "restrict_content",
"target": "space"
}
interface SpacePermissionV2 {
    _links?: GenericLinks;
    id: number;
    operation: {
        key:
            | "copy"
            | "move"
            | "use"
            | "update"
            | "delete"
            | "read"
            | "create"
            | "restore"
            | "administer"
            | "export"
            | "purge"
            | "purge_version"
            | "archive"
            | "restrict_content";
        target:
            | "attachment"
            | "page"
            | "comment"
            | "space"
            | "blogpost";
    } & {
        [key: string]: unknown;
    };
    subject: PermissionSubject;
}

Hierarchy

  • Record<string, unknown>
    • SpacePermissionV2

Properties

_links?: GenericLinks
id: number
operation: {
    key:
        | "copy"
        | "move"
        | "use"
        | "update"
        | "delete"
        | "read"
        | "create"
        | "restore"
        | "administer"
        | "export"
        | "purge"
        | "purge_version"
        | "archive"
        | "restrict_content";
    target:
        | "attachment"
        | "page"
        | "comment"
        | "space"
        | "blogpost";
} & {
    [key: string]: unknown;
}

Type declaration

  • key:
        | "copy"
        | "move"
        | "use"
        | "update"
        | "delete"
        | "read"
        | "create"
        | "restore"
        | "administer"
        | "export"
        | "purge"
        | "purge_version"
        | "archive"
        | "restrict_content"
  • target:
        | "attachment"
        | "page"
        | "comment"
        | "space"
        | "blogpost"

    The space or content type that the operation applies to.

The user or group that the permission applies to.