GET
/
iam
/
clients
/
{clientId}
/
tokens
curl --request GET \
  --url https://api.gcore.com/iam/clients/{clientId}/tokens \
  --header 'APIKey: <api-key>'
[
  {
    "name": "My token",
    "description": "It's my token",
    "exp_date": null,
    "client_user": {
      "role": {
        "id": 1,
        "name": "Administrators"
      },
      "deleted": false,
      "user_id": 123,
      "user_name": "John Doe",
      "user_email": "some@email.com",
      "client_id": 456
    },
    "id": 42,
    "deleted": false,
    "expired": false,
    "created": "2021-01-01 12:00:00+00:00",
    "last_usage": null
  }
]

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

clientId
integer
required

Account ID.

Query Parameters

role
string

Group's ID. Possible values are:

  • 1 - Administrators* 2 - Users* 5 - Engineers* 3009 - Purge and Prefetch only (API+Web)* 3022 - Purge and Prefetch only (API)

Example, &role=Engineers

issued_by
integer

User's ID. Use to get API tokens issued by a particular user.
Example, &issued_by=1234

not_issued_by
integer

User's ID. Use to get API tokens issued by anyone except a particular user.
Example, ¬_issued_by=1234

deleted
boolean

The state of API tokens included in the response.
Two possible values:

  • True - API token was not deleted.* False - API token was deleted.

Example, &deleted=True

Response

200
application/json

OK.

The response is of type object[].