Create System Account Access Token

Creates an access token for the specified system account (SA). The access token can be used for authenticating API and CLI requests. The token will only be displayed once on creation. Returns a 409 if the system account already has a token with the same name.

post
https://global.api.konghq.com/v3/system-accounts/{accountId}/access-tokens

Path Parameters

accountIdstringrequired

ID of the system account.

Body

application/json

The request body to create a system account access token.

namestringrequired
expires_atstring(date-time)required

Response

application/json

A response including a single system account access token with the token.

System Account Access Token Created Response

idstring(uuid)read-only

ID of the system account access token.

namestring

Name of the system account access token.

created_atstring(date-time)read-only

Timestamp of when the system account access token was created.

updated_atstring(date-time)read-only

Timestamp of when the system account access token was last updated.

expires_atstring(date-time)read-only

Timestamp of when the system account access token will expire.

last_used_atstring(date-time)read-only

Timestamp of when the system account access token was last used.

tokenstringread-only

The token of the system account access token.

post/system-accounts/{accountId}/access-tokens

Body

{ "name": "Sample Access Token", "expires_at": "2019-08-24T14:15:22Z" }
 
application/json

Get a System Account Access Token

Returns the system account (SA) access token for the SA Access Token ID specified as a path parameter.

get
https://global.api.konghq.com/v3/system-accounts/{accountId}/access-tokens/{tokenId}

Path Parameters

accountIdstringrequired

ID of the system account.

tokenIdstringrequired

ID of the system account access token.

Response

application/json

A response including a single system account access token.

System Account Access Token

Schema of the system account access token.

idstring(uuid)read-only

ID of the system account access token.

namestring

Name of the system account access token.

created_atstring(date-time)read-only

Timestamp of when the system account access token was created.

updated_atstring(date-time)read-only

Timestamp of when the system account access token was last updated.

expires_atstring(date-time)

Timestamp of when the system account access token will expire.

last_used_atstring(date-time)read-only

Timestamp of when the system account access token was last used.

get/system-accounts/{accountId}/access-tokens/{tokenId}
 
application/json

Update System Account Access Token

Updates the specified access token. Returns a 409 if the updated name is the same as another token belonging to the specified system user.

patch
https://global.api.konghq.com/v3/system-accounts/{accountId}/access-tokens/{tokenId}

Path Parameters

accountIdstringrequired

ID of the system account.

tokenIdstringrequired

ID of the system account access token.

Body

application/json
namestringrequired

Name of the system account access token.

Response

application/json

A response including a single system account access token.

System Account Access Token

Schema of the system account access token.

idstring(uuid)read-only

ID of the system account access token.

namestring

Name of the system account access token.

created_atstring(date-time)read-only

Timestamp of when the system account access token was created.

updated_atstring(date-time)read-only

Timestamp of when the system account access token was last updated.

expires_atstring(date-time)

Timestamp of when the system account access token will expire.

last_used_atstring(date-time)read-only

Timestamp of when the system account access token was last used.

patch/system-accounts/{accountId}/access-tokens/{tokenId}

Body

{ "name": "name" }
 
application/json

Delete System Account Access Token

Deletes the specified token. Returns 404 if the token was not found.

delete
https://global.api.konghq.com/v3/system-accounts/{accountId}/access-tokens/{tokenId}

Path Parameters

accountIdstringrequired

ID of the system account.

tokenIdstringrequired

ID of the system account access token.

Response

No Content

delete/system-accounts/{accountId}/access-tokens/{tokenId}
 

System Accounts - Roles