Get where an identity may act with one permission
/api/v1/identities/{id}/accessible-nodesReturns where the identity may act with permission, for a list query: roots, the nodes it holds the permission at that no other such node already covers, and nodes, every node beneath those roots, the roots included, when there are at most max_nodes of them (default 10,000; at most 50,000). Past the cap nodes is null and complete false, and the caller filters by roots against its own closure table or materialised path. env_wide is true when a root is the Environment's own root, so every node qualifies and no filter is needed; nodes is null then too. The same rules as evaluate decide the roots, so a list filtered by this answer agrees with the check a write makes. Returns 404 when the identity has no membership in this Environment.
Authentication
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
X-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 Query Parameters
permissionstring Required The permission to answer for, by key.
max_nodesnumber Optional The largest `nodes` set to return. Past it, `nodes` is null and `complete` false.
Responses
application/json
data *IdentityAccessibleNodesResponseDto
application/json
error *ApiErrorBodyDto
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/accessible-nodes?permission=value&max_nodes=0" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "permission": "reports.view", "env_wide": false, "roots": [ "string" ], "nodes": [ "string" ], "complete": false } }
Tell us how we can improve this guide.