List API keys

apiKeys(input: ApiKeysInput): ApiKeysPayload!

Arguments

ArgumentTypeRequired
inputApiKeysInputNo

Input fields

input

ApiKeysInput

FieldTypeRequiredDescription
projectReferenceStringNoProject ID or slug. Listing the keys bound to a project requires project.api_keys.read. Omit to list the caller's own keys; a project-scoped API-key caller retains its enforced project when this field is omitted.
limitIntNo
cursorStringNo
statusStringNoWhich keys to list: active (the default), expired, revoked or all.
sortByApiKeySortByNoField to sort by. Ties break by key ID ascending. Default: "created_at".
sortOrderApiKeySortOrderNoSort direction. Default: "desc".

Response

Returns ApiKeysPayload!. Open the type for its fields and nested types.

FieldType
data[ApiKey!]!
pageInfoPageInfo!
totalCountInt!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query APIKeys($input: ApiKeysInput) {
  apiKeys(input: $input) {
    totalCount
    data {
      id
      projectId
      name
      status
      createdAt
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
json
{}