Zone Roles

List user role assignments

Changed on

Returns the roles assigned to the specified user within the zone. Use cursor pagination via after/before; pass expand[]=total_count to include the matching row count. Pass filter[scope_id] (repeatable, max 100) to keep only the assignments scoped to those targets, and filter[scoped]=false to keep only unscoped assignments (the ones applying to the zone itself), so a known set of targets resolves in a fixed number of requests.

get/zones/{zoneId}/users/{userId}/roles

Request

  • Base URL
    https://docs.keycard.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://docs.keycard.ai/zones/{zoneId}/users/{userId}/roles
  • Auth
    • HTTP bearer
    • or OAuth 2
      Client credentials
      Token URL: /service-account-token

Path parameters

zoneIdstring required

Zone ID

userIdstring required

User ID

Query parameters

afterstring

Cursor for forward pagination

beforestring

Cursor for backward pagination

limitinteger

Maximum number of items to return

'total_count'
OR
string[]
string

Restrict results to assignments scoped to this target ID (e.g. a zone ID). Repeatable, max 100; values are OR'd. Unscoped assignments never match.

OR
string[]
filter[scoped]boolean

false keeps only unscoped assignments (those applying to the zone itself, e.g. an org role); true keeps only scoped ones. Omit to list both.

Response

Default Response

Changes

    • info

      added the new optional query request parameter filter[scope_id]

    • info

      added the new optional query request parameter filter[scoped]

    • info

      added the non-success response with the status

    • info

      the // response's property pattern ^[a-z0-9]+(?:[-_][a-z0-9]+)*$ was added for the status

    • info

      added the required property // to the response with the status