ApiToken

Get an API token

GET
Retrieve information about a specific API token.

Path parameters

organizationIdstringRequired
The ID of the Organization where you want to retrieve token information.
tokenIdstringRequired
The ID of the token that you want to retrieve data for.

Response

This endpoint returns an object
createdAt
datetime

The time when the API token was created in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

description
string
The description of the API token.
id
string
The API token's ID.
name
string
The name of the API token.
shortToken
string
The short value of the API token.
startAt
datetime

The time when the API token will become valid in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

type
enum
The type of the API token.
Allowed values: DEPLOYMENTWORKSPACEORGANIZATION
updatedAt
datetime

The time when the API token was last updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

createdBy
objectOptional
endAt
datetimeOptional

The time when the API token expires in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

expiryPeriodInDays
integerOptional
The expiry period of the API token in days.
lastUsedAt
datetimeOptional

The time when the API token was last used in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

roles
list of objectsOptional
The roles of the API token.
token
stringOptional
The value of the API token.
updatedBy
objectOptional
GET
1curl https://api.astronomer.io/iam/v1beta1/organizations/organizationId/tokens/tokenId \
2 -H "Authorization: Bearer <token>"
Response
1{
2 "createdAt": "2022-11-22T04:37:12Z",
3 "description": "my token description",
4 "id": "clm8q7f6q000008lcgyougpsk",
5 "name": "My token",
6 "shortToken": "short-token",
7 "startAt": "2022-11-22T04:37:12Z",
8 "type": "DEPLOYMENT",
9 "updatedAt": "2022-11-22T04:37:12Z",
10 "createdBy": {
11 "id": "clm8qv74h000008mlf08scq7k",
12 "apiTokenName": "my-token",
13 "avatarUrl": "https://avatar.url",
14 "fullName": "Jane Doe",
15 "subjectType": "USER",
16 "username": "user1@company.com"
17 },
18 "endAt": "2022-11-22T04:37:12Z",
19 "expiryPeriodInDays": 30,
20 "lastUsedAt": "2022-11-22T04:37:12Z",
21 "roles": [
22 {
23 "entityId": "clm8sgvai000008l794psbkdv",
24 "entityType": "DEPLOYMENT",
25 "role": "WORKSPACE_MEMBER"
26 }
27 ],
28 "token": "token",
29 "updatedBy": {
30 "id": "clm8qv74h000008mlf08scq7k",
31 "apiTokenName": "my-token",
32 "avatarUrl": "https://avatar.url",
33 "fullName": "Jane Doe",
34 "subjectType": "USER",
35 "username": "user1@company.com"
36 }
37}