Skip to content

Permissions API ​

8 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

GET /api/v1/permission-targets ​

List permission targets

List all permission targets

Responses

StatusDescriptionBody
200List of permission targetsapplication/json: object
403Forbiddenapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
dataarray of PermissionTargetyes-

POST /api/v1/permission-targets ​

Create permission target

Create a new permission target

Request body (required)

application/json: object

FieldTypeRequiredDescription
actionsarray of stringnoItems: one of: read, write, delete, manage, annotate.
namestringyes-
path_patternstringno-
repository_filterstringno-

Responses

StatusDescriptionBody
201Permission target createdapplication/json: PermissionTarget
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
409Conflict with the current stateapplication/json: Error

GET /api/v1/permission-targets/{id} ​

Get permission target

Get details of a specific permission target

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200Permission target detailsapplication/json: PermissionTarget
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Permission target not found-

PATCH /api/v1/permission-targets/{id} ​

Update permission target

Update a permission target

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
actionsarray of stringnoItems: one of: read, write, delete, manage, annotate.
namestringno-
path_patternstringno-
repository_filterstringno-

Responses

StatusDescriptionBody
200Permission target updatedapplication/json: PermissionTarget
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404Permission target not found-
409Conflict with the current stateapplication/json: Error

DELETE /api/v1/permission-targets/{id} ​

Delete permission target

Delete a permission target

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
204Permission target deleted-
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Permission target not found-

GET /api/v1/permission-targets/{id}/assignments ​

List permission assignments

List the users and groups a permission target is assigned to (admin only)

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200Assignments sorted by principal type then nameapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Admin access required-
404Permission target not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
dataarray of PermissionAssignmentyes-

POST /api/v1/permission-targets/{id}/assignments ​

Assign permission

Assign a permission target to a user or group

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
group_idstring (uuid)no-
user_idstring (uuid)no-

Responses

StatusDescriptionBody
200Permission assigned-
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404The addressed resource was not foundapplication/json: Error

DELETE /api/v1/permission-targets/{id}/assignments ​

Unassign permission

Remove a permission assignment

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
group_idstring (uuid)no-
user_idstring (uuid)no-

Responses

StatusDescriptionBody
204Permission unassigned-
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404The addressed resource was not foundapplication/json: Error

Free software under the AGPL-3.0-or-later.