For the complete documentation index, see llms.txt. This page is also available as Markdown.

Role Permissions

List permissions associated with a role

get

Returns the permissions currently associated with the specified role.

Path parameters
role_idintegerRequired

Role ID.

Responses
200

Permissions of the role

application/json
get/api/roles/{role_id}/permissions
GET /api/roles/{role_id}/permissions HTTP/1.1
Accept: */*
{
  "data": [
    {
      "group": {
        "id": 3,
        "name": "data_dictionary"
      },
      "id": 42,
      "name": "view_data_structure"
    }
  ]
}

Associate a permission with a role

post

Adds a permission to a role. The permission may be identified either by permission_id or by permission_name.

Requires administrator access.

Path parameters
role_idintegerRequired

Role ID.

Body

The permission to associate may be identified either by its identifier or by its name.

or
Responses
200

Association created

application/json
post/api/roles/{role_id}/permissions
POST /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "permission_id": 42
}
{
  "data": {
    "permission_id": 42,
    "role_id": 3
  }
}

Replace permissions associated with a role

put

Replaces the full set of permissions associated with a role with the supplied list. Permissions not included in the payload are dissociated from the role.

Requires administrator access.

Path parameters
role_idintegerRequired

Role ID.

Body

Replaces the full set of permissions associated with a role with the supplied list.

Permissions included in the payload are associated with the role. Permissions not included are dissociated.

Responses
200

Updated permissions of the role

application/json
put/api/roles/{role_id}/permissions
PUT /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "permissions": [
    {
      "id": 42
    },
    {
      "id": 43
    }
  ]
}
{
  "data": [
    {
      "group": {
        "id": 3,
        "name": "data_dictionary"
      },
      "id": 42,
      "name": "view_data_structure"
    }
  ]
}

Dissociate a permission from a role

delete

Removes the association between a role and a permission. The permission may be identified either by permission_id or by permission_name.

Requires administrator access.

If permission_name is supplied and no permission with that name exists, the request is rejected with 404.

If the association itself does not exist, the request is rejected with 404.

Path parameters
role_idintegerRequired

Role ID.

Body

The permission to remove may be identified either by its identifier or by its name.

or
Responses
204

Association removed

No content

delete/api/roles/{role_id}/permissions
DELETE /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "permission_id": 42
}

No content

Replace permissions associated with a role

patch

Replaces the full set of permissions associated with a role with the supplied list. Permissions not included in the payload are dissociated from the role.

Requires administrator access.

Path parameters
role_idintegerRequired

Role ID.

Body

Replaces the full set of permissions associated with a role with the supplied list.

Permissions included in the payload are associated with the role. Permissions not included are dissociated.

Responses
200

Updated permissions of the role

application/json
patch/api/roles/{role_id}/permissions
PATCH /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "permissions": [
    {
      "id": 42
    },
    {
      "id": 43
    }
  ]
}
{
  "data": [
    {
      "group": {
        "id": 3,
        "name": "data_dictionary"
      },
      "id": 42,
      "name": "view_data_structure"
    }
  ]
}

Last updated