Skip to main content
GET
/
organizations
/
{organizationId}
/
tokens
List API tokens
curl --request GET \
  --url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/tokens \
  --header 'Authorization: Bearer <token>'
{
  "limit": 10,
  "offset": 0,
  "tokens": [
    {
      "createdAt": "2022-11-22T04:37:12Z",
      "description": "my token description",
      "id": "clm8q7f6q000008lcgyougpsk",
      "kind": "STANDARD",
      "name": "My token",
      "shortToken": "short-token",
      "startAt": "2022-11-22T04:37:12Z",
      "type": "WORKSPACE",
      "updatedAt": "2022-11-22T04:37:12Z",
      "createdBy": {
        "id": "clm8qv74h000008mlf08scq7k",
        "apiTokenName": "my-token",
        "avatarUrl": "https://avatar.url",
        "fullName": "Jane Doe",
        "subjectType": "USER",
        "username": "user1@company.com"
      },
      "endAt": "2022-11-22T04:37:12Z",
      "expiryPeriodInDays": 30,
      "lastUsedAt": "2022-11-22T04:37:12Z",
      "roles": [
        {
          "entityId": "clm8sgvai000008l794psbkdv",
          "entityType": "WORKSPACE",
          "role": "WORKSPACE_MEMBER",
          "deploymentId": "clm8t5u4q000008jq4qoc3031"
        }
      ],
      "token": "token",
      "updatedBy": {
        "id": "clm8qv74h000008mlf08scq7k",
        "apiTokenName": "my-token",
        "avatarUrl": "https://avatar.url",
        "fullName": "Jane Doe",
        "subjectType": "USER",
        "username": "user1@company.com"
      }
    }
  ],
  "totalCount": 100
}

Documentation Index

Fetch the complete documentation index at: https://astronomer-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

The ID of the Organization to list tokens for.

Query Parameters

workspaceId
string

The ID of the Workspace to list API tokens for.

deploymentId
string

The ID of the Deployment to list API tokens for.

dagId
string

The ID of the DAG to list API tokens for.

dagTags
string[]

The tags of the DAG to list API tokens for.

includeOnlyOrganizationTokens
boolean

Whether to show only Organization API tokens.

kind
enum<string>

The kind of the API token to list API tokens for.

Available options:
STANDARD,
DIRECT_ACCESS
offset
integer
default:0

Offset for pagination

Required range: x >= 0
limit
integer
default:20

Limit for pagination

Required range: 0 <= x <= 1000
sorts
enum<string>[]

Sorting criteria, each criterion should conform to format 'fieldName:asc' or 'fieldName:desc'

Available options:
name:asc,
name:desc,
description:asc,
description:desc,
createdAt:asc,
createdAt:desc,
updatedAt:asc,
updatedAt:desc,
tokenStartAt:asc,
tokenStartAt:desc

Response

OK

limit
integer
required

The limit of values in this page.

Example:

10

offset
integer
required

The offset of values in this page.

Example:

0

tokens
object[]
required

The list of API tokens in this page.

totalCount
integer
required

The total number of API tokens.

Example:

100