API tokens

Get API tokens by name

Changed on

Retrieves all API tokens that match a given token name. Because token names are not unique, this endpoint will always return a list. If no tokens with the provided name exist, the list will be empty. Otherwise, it will contain all the tokens with the given name.

get/api/admin/api-tokens/{name}

Request

  • Base URL
    https://app.unleash-instance.example.com
  • URL
    https://app.unleash-instance.example.com/api/admin/api-tokens/{name}
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Path parameters

namestring required

Response

apiTokensSchema

Example response

{
  "tokens": [
    {
      "secret": "project:environment.xyzrandomstring",
      "tokenName": "some-user",
      "type": "client",
      "environment": "development",
      "project": "developerexperience",
      "projects": [
        "developerexperience",
        "enterprisegrowth"
      ],
      "expiresAt": "2023-04-19T08:15:14.000Z",
      "createdAt": "2023-04-19T08:15:14.000Z",
      "seenAt": "2023-04-19T08:15:14.000Z",
      "alias": "randomid-or-some-alias",
      "secure": true
    }
  ]
}

Changes

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became optional for the status

    • info

      added the optional property // to the response with the status