Skip to main content
GET
List role grants held by API keys, External Apps and agents
Returns the grants held by API keys, External Apps and agents that you may see, and people’s grants when you pass includePersonGrants=true (or actorKind=person for people alone): grants:read at the grant’s scope, a role that is not a compatibility role, and, for an agent’s grant, agents:read at the agent’s home and in your credential’s scopes. People’s grants are returned by the person’s id; no grant says who gave it or why, or carries a name. A page may be short or empty while meta.hasMore is true; follow meta.nextCursor. To give or revoke a role, call giveRole or revokeRole, which need grants:manage. See Roles and grants.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Query Parameters

cursor
string

The previous page's meta.nextCursor; any other value is 400.

Minimum string length: 1
limit
integer
default:50

Grants read per page, 1 to 50 (default 50); a larger value is 400 too_big.

Required range: 1 <= x <= 50
actorKind
enum<string>

Only grants held by this kind of actor. person lists people's grants alone.

Available options:
api_key,
external_app,
agent,
person
includePersonGrants
enum<string>

true also returns people's grants. Without it (or actorKind=person) the page holds no person grant, as before.

Available options:
true

Response

One page of role grants

data
object[]
required
meta
object
required

A list page's continuation. While hasMore is true, nextCursor is a string: pass it as cursor for the next page. hasMore: false ends the list; with truncated: true, more exist past what this list reads, and no cursor reaches them.