Get where an identity holds each permission
/api/v1/identities/{id}/grantsReturns, 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
Authorization Option A JWT access token
X-API-Key Option B API key for management-tier access
Path Parameters
idstring Required Responses
application/json
items *IdentityGrantResponseDto[]
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X GET "https://auth.canopy-io.com/api/v1/identities/value/grants" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "items": [ { "permission": "reports.view", "nodes": [ "string" ] } ] }
Tell us how we can improve this guide.