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, one page of (permission, node_id) rows: every permission the identity holds, paired with each hierarchy node its grants were made at — the nodes themselves, not expanded through their descendants. Rows are ordered by permission, then node; a caller building the whole map walks every page. 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 parent edges fetched once from GET /api/v1/nodes/parents 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. By default, assignments outside their effective window are excluded. With include=windows, every assignment is a row carrying effective_from and effective_to (null for an unbounded side), in effect or not, so a caller applies the window itself: it can say why a check fails (the grant has ended, or has not begun) and drop a grant at its boundary without reading again. Returns 404 when the identity has no membership in this Environment.

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

Query Parameters

pagenumber Optional

Page number (1-based)

min 1

takenumber Optional

Items per page (1-100, default 20)

range 1–100

includeenum Optional

`windows` adds `effective_from` and `effective_to` to every row and includes assignments outside their window, so the caller applies the window itself.

one of "windows"

Responses

application/json

  • model_versioninteger*

    The version of the authorization model these rows describe. A client that evaluates from them refuses a version it does not know rather than guessing.

  • itemsIdentityGrantResponseDto[]*
  • paginationPageMetaDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Pagination

This endpoint returns a paginated collection. Use the query parameters below to page through results.

pagenumber

Page number (1-indexed). Defaults to 1.

takenumber

Items per page (1 to 100). Defaults to 20.

Each response includes an items array alongside a pagination object with item_count, page_count, has_previous_page, and has_next_page fields.

Returned object

Request
curl -X GET "https://auth.canopy-io.com/api/v1/identities/value/grants?page=0&take=0&include=windows" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "model_version": 0,
  "items": [
    {
      "permission": "reports.view",
      "node_id": "00000000-0000-0000-0000-000000000000",
      "effective_from": "2026-04-20T12:00:00.000Z",
      "effective_to": "2026-04-20T12:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 0,
    "take": 0,
    "item_count": 0,
    "page_count": 0,
    "has_previous_page": false,
    "has_next_page": false
  }
}
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
POSTSet an identity's password (admin)
POSTForce a password reset for an identity (admin)
GETList an identity's active sessions (admin)
DELETERevoke one of an identity's sessions (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
GETGet where an identity may act with one permission
Was this page helpful?

Tell us how we can improve this guide.