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:

graphql
tokens(
      searchFilter: string
      typeFilter: [Tokens__Type!]
      parentEntityIdFilter: [string!]
      sortBy: Tokens__SortBy!
      orderBy: OrderBy = ASC
      skip: integer = 0
      limit: integer = 50
   ): TokenQueryResultSet!

Given Datatypes

The given datatype, Tokens__Type is an enumerated list of choices: ViewPermissionToken, OrganizationPermissionToken, or SystemPermissionToken.

The datatype, Tokens__SortBy is also an enumerated list, but of only two choices: ExpirationDate, of 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

ParameterTypeRequired[a]DefaultDescription
totalResultsintegeryes The total number of matching results.
results[Token]yes The paginated results set (see Token Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.