1. Docs
  2. API Reference
  3. Get where an identity holds each permission

Get where an identity holds each permission

GET/api/v1/identities/{id}/grants

Returns, for the current Environment, every permission the identity holds mapped to the hierarchy nodes its grants were made at — the nodes themselves, not expanded through their descendants. A grant already means "this node and everything beneath it", so a caller answers a node-scoped question by walking up from the node in question and looking for one of these roots, using a copy of the tree fetched once from GET /api/v1/nodes and shared across identities. Answers both scopes without a further call: the permission appearing at all is the Application-wide answer, and the walk is the node-scoped one. Scheduled assignments outside their effective window are excluded. Returns 404 when the identity has no membership in this Environment.

Authentication

Bearer TokenAuthorization Option A

JWT access token

API KeyX-API-Key Option B

API key for management-tier access

Path Parameters

idstring Required

Responses

application/json

  • itemsIdentityGrantResponseDto[]*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X GET "https://auth.canopy-io.com/api/v1/identities/value/grants" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "items": [
    {
      "permission": "reports.view",
      "nodes": [
        "string"
      ]
    }
  ]
}
Related endpoints
GETList identities in Application
POSTCreate an identity
GETList identities with their role assignments
GETGet Application identities summary
POSTBulk-create identities
GETGet an identity
PATCHUpdate an identity
DELETERemove an identity
GETGet identity detail with role assignments
POSTActivate an identity
POSTDeactivate an identity
POSTSet an identity's password (admin)
POSTForce a password reset for an identity (admin)
POSTRevoke all of an identity's sessions (admin)
GETGet MFA enrollment summary for an identity
POSTForce-reset an identity's MFA — admin recovery action
GETRead an identity's auth state for backend decisioning
POSTMark an identity's email verified (admin)
GETGet identity's role assignments
GETGet identity's effective permissions
Was this page helpful?

Tell us how we can improve this guide.