v1

latestOpenAPI 3.0.1MPL 2.02026-07-17211027.3 KB
rbac

Add a permission to the role

post/api/v1beta1/roles/{role}/permissions

Request body

subjectstring guid

The subject the permission is granted to. Can be omitted in relative paths like /users/{username}/permissions as it will be overwritten by the relative subject itself.

objectstring guid required

The object this permission is granted over

actionstring required

The action that is permitted on the object

Example request

{
  "subject": "user:root",
  "object": "docker_image:example",
  "action": "read"
}

Response

The newly created permission

subjectstring guid

The subject the permission is granted to. Can be omitted in relative paths like /users/{username}/permissions as it will be overwritten by the relative subject itself.

objectstring guid required

The object this permission is granted over

actionstring required

The action that is permitted on the object

Example response

{
  "subject": "user:root",
  "object": "docker_image:example",
  "action": "read"
}