1. Docs
  2. API Reference
  3. Get identity's role assignments

Get identity's role assignments

GET/portal/v1/accounts/{accountSlug}/applications/{appSlug}/identities/{id}/assignments

Authentication

  • Bearer Token Authorization

    JWT access token

Path Parameters

Name Required Type Description
idRequiredstring

Query Parameters

Name Required Type Description
pageOptionalnumber Page number (1-based)
takeOptionalnumber Items per page (1-100, default 20)
qOptionalstring Search term
sort_byOptionalstring Column to sort by. Allowed values depend on the endpoint.
orderOptionalenum: "asc" | "desc" Sort direction

Code samples

cURLJavaScriptPythonGo
curl -X GET "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/identities/value/assignments?page=0&take=0&q=value&sort_by=value&order=asc" \
  -H "Authorization: Bearer $CANOPY_TOKEN"

Responses

200 Paginated list
{
  "items": [
    {
      "id": "string",
      "identity_id": "string",
      "application_node_id": "string",
      "role_id": "string",
      "effective_from": "2026-04-20T12:00:00.000Z",
      "effective_to": "2026-04-20T12:00:00.000Z",
      "created_at": "2026-04-20T12:00:00.000Z",
      "updated_at": "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
  }
}

application/json

  • itemsAssignmentResponseDto[]*
  • paginationPageMetaDto*
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)

Pagination

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

page
Page number (1-indexed). Defaults to 1.
take
Items per page (1–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

On this page

Related endpoints

GETList identities in Application
POSTCreate an identity
GETList identities with their role assignments
GETGet Application identities summary
POSTBulk-create identities
POSTRecord a bulk-import wizard completion
GETGet an identity
PATCHUpdate an identity
DELETERemove an identity
GETGet identity detail with role assignments
POSTActivate an identity
POSTDeactivate an identity
GETGet identity's effective permissions