• API Token
  • API Key
Cloud
API Access / Reference / REST API

API Key

Postman Collection
OpenAPI
GET

Get API key count in an org

Gets count of user API keys in an organization.

Scopes

OAuth 2.0 scopes required: read:tokens:admin

Request

Path parameters

orgId

string

Required

Query parameters

q

string

keyType

string

expiresAtSearchType

string

expiresAtUom

string

expiresAtValue

integer

expiresAtFrom

string

expiresAtTo

string

expiresAtRangeFrom

string

expiresAtRangeTo

string

lastActiveAtSearchType

string

Responses

Returned if the request is successful.

Headers

X-RateLimit-Limit

integer

X-RateLimit-Remaining

integer

X-RateLimit-Reset

string

application/json

integer

GET/orgs/{orgId}/api-keys/count
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/admin/api-access/v1/orgs/{orgId}/api-keys/count' \ --header 'Accept: application/json'
GET

Get all API keys in an org

Gets all user API keys in an organization.

Scopes

OAuth 2.0 scopes required: read:tokens:admin

Request

Path parameters

orgId

string

Required

Query parameters

q

string

keyType

string

expiresAtSearchType

string

expiresAtUom

string

expiresAtValue

integer

expiresAtFrom

string

expiresAtTo

string

expiresAtRangeFrom

string

expiresAtRangeTo

string

lastActiveAtSearchType

string

Responses

Returned if the request is successful.

Headers

X-RateLimit-Limit

integer

X-RateLimit-Remaining

integer

X-RateLimit-Reset

string

application/json

ApiKeySearchResponse
GET/orgs/{orgId}/api-keys
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/admin/api-access/v1/orgs/{orgId}/api-keys' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 { "data": [ { "id": "<string>", "label": "<string>", "createdAt": "<string>", "expiresAt": "<string>", "lastActiveAt": "<string>", "systemAccountId": "<string>", "resource": "<string>", "orgId": "<string>", "createdBy": { "id": "<string>", "name": "<string>", "email": "<string>" }, "scopes": [ "<string>" ], "targetResources": [ "<string>" ] } ], "links": { "self": "<string>", "next": "<string>", "prev": "<string>" } }
POST

Create a new API key for an org

Creates a new user API key

Scopes

OAuth 2.0 scopes required: write:tokens:admin

Request

Path parameters

orgId

string

Required

Query parameters

label

string

Required
expiresAt

string

Required
resource

string

Required
scopes

array<string>

Required
targetResources

array<string>

Responses

Returned if the request is successful.

Headers

X-RateLimit-Limit

integer

X-RateLimit-Remaining

integer

X-RateLimit-Reset

string

application/json

CreateApiKeyResponse
POST/orgs/{orgId}/api-keys
1 2 3 curl --request POST \ --url 'https://api.atlassian.com/admin/api-access/v1/orgs/{orgId}/api-keys?label={label}&expiresAt={expiresAt}&resource={resource}&scopes={scopes}' \ --header 'Accept: application/json'
201Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "id": "<string>", "token": "<string>", "resource": "<string>", "label": "<string>", "createdBy": { "id": "<string>", "name": "<string>", "email": "<string>" }, "createdAt": "<string>", "expiresAt": "<string>", "scopes": [ "<string>" ], "targetResources": [ "<string>" ] }
PATCH

Revoke an API key for an org

Revokes an existing API key

Scopes

OAuth 2.0 scopes required: delete:tokens:admin

Request

Path parameters

orgId

string

Required
apiKeyId

string

Required

Responses

Returned if the request is successful.

Headers

X-RateLimit-Limit

integer

X-RateLimit-Remaining

integer

X-RateLimit-Reset

string

PATCH/orgs/{orgId}/api-keys/revoke/{apiKeyId}
1 2 curl --request PATCH \ --url 'https://api.atlassian.com/admin/api-access/v1/orgs/{orgId}/api-keys/revoke/{apiKeyId}'

Rate this page: