Skip to main content
GET
/
organizations
/
{organizationId}
/
deployments
/
{deploymentId}
/
agent-tokens
List Agent API Tokens
curl --request GET \
  --url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/deployments/{deploymentId}/agent-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 that owns the deployment you want to list tokens for.

deploymentId
string
required

The ID of the deployment that owns the Agent API tokens you want to list.

Query Parameters

offset
integer
default:0

The number of results to skip before returning values.

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

The maximum number of results to return.

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

A list of field names to sort by, and whether to show results as ascending or descending. Formatted as <fieldName>:asc or <fieldName>:desc.

Available options:
name:asc,
name:desc,
description:asc,
description:desc,
createdAt:asc,
createdAt:desc,
updatedAt:asc,
updatedAt:desc,
createdById:asc,
createdById:desc,
updatedById:asc,
updatedById: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