API Stability |
Long-Term
|
The tokens() GraphQL query returns paginated search results for tokens.
For more information on access tokens of various types, see the Ingest Tokens documentation page.
Syntax
Below is the syntax for the tokens() query field:
tokens(
searchFilter: string
typeFilter: [Tokens__Type!]
parentEntityIdFilter: [string!]
sortBy: Tokens__SortBy!
orderBy: OrderBy
skip: integer
limit: integer
): TokenQueryResultSet!
Below is an example of how this query field might be used:
query {
tokens(sortBy: Name, orderBy: ASC)
{ totalResults,
results{name, expireAt} }
}
{
"data": {
"tokens": {
"totalResults": 7,
"results": [
{
"name": "Cluster Management",
"createdAt": 1729603406707,
"expireAt": null
},
{
"name": "jenkinsAuto",
"createdAt": 1729830704004,
"expireAt": null
},
{
"name": "Tester",
"createdAt": 1730394131348,
"expireAt": 1731258131010
}
]
}
}
}
Given Datatypes
The given datatype Tokens__Type
is an
enumerated list of choices. They're listed below:
Table: Tokens__Type
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Apr 10, 2025 | |||||
OrganizationManagementPermissionToken | boolean | Long-Term | Whether the token is used for organization management access. | ||
OrganizationPermissionToken | boolean | Long-Term | Whether the token is an organization permission token. | ||
SystemPermissionToken | boolean | Long-Term | Whether the token is for system permission access. | ||
ViewPermissionToken | boolean | Long-Term | Whether the token is a view permission token. |
The Tokens__SortBy
is an enumerated list of
choices. They're listed below:
Table: Tokens__SortBy
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Apr 10, 2025 | |||||
ExpirationDate | boolean | Long-Term | Whether to sort tokens by expiration date. | ||
name | boolean | Long-Term | Whether to sort tokens by name. |
Returned Datatypes
The returned datatype TokenQueryResultSet
has its own parameters. Below is a list of them along with their
datatypes and a description of each:
Table: TokenQueryResultSet
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Oct 3, 2024 | |||||
results | [Token ] | yes | Long-Term | The paginated results set. See Token . | |
totalResults | integer | yes | Long-Term | The total number of matching results. |