query · Module: Accounts · Requires accounts:read
Arguments
Returns
RoleList!
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
query Roles($limit: Int) {
roles(limit: $limit) {
data {
id
object
name
livemode
created
updated
scopes
built_in
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"roles": {
"data": [
{
"id": "role_1a2B3c",
"object": "role",
"name": "Example",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"scopes": [
"example"
],
"built_in": true
}
],
"has_more": true
}
}
}
List roles
query Roles($limit: Int) {
roles(limit: $limit) {
data {
id
object
name
livemode
created
updated
scopes
built_in
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"roles": {
"data": [
{
"id": "role_1a2B3c",
"object": "role",
"name": "Example",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"scopes": [
"example"
],
"built_in": true
}
],
"has_more": true
}
}
}
query · Module: Accounts · Requires accounts:read
| Argument | Type | Description |
|---|---|---|
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
RoleList!
| Field | Type |
|---|---|
data | [Role!]! |
has_more | Boolean |
errors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Roles($limit: Int) {
roles(limit: $limit) {
data {
id
object
name
livemode
created
updated
scopes
built_in
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"roles": {
"data": [
{
"id": "role_1a2B3c",
"object": "role",
"name": "Example",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"scopes": [
"example"
],
"built_in": true
}
],
"has_more": true
}
}
}