1. Docs
  2. API Reference
  3. Get permissions for a role

Get permissions for a role

GET/api/v1/roles/{id}/permissions

Returns the permission keys currently attached to a role as a sorted { items } array of strings. Returns 404 when the role does not exist in the current Environment. Requires the rbac.view_roles permission.

Authentication

Bearer TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-API-Key Option B

API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.

Path Parameters

idstring Required

Responses

application/json

  • itemsstring[]*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*
Request
curl -X GET "https://auth.canopy-io.com/api/v1/roles/value/permissions" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "items": [
    "string"
  ]
}
Related endpoints
GETList roles
POSTCreate a custom role
GETGet a role
PATCHUpdate a role
DELETEDelete a role
PUTReplace permissions on a role
Was this page helpful?

Tell us how we can improve this guide.