• Home
  • Dynatrace Managed
  • Cluster API
  • Cluster API v2
  • Cluster tokens
  • List available Cluster tokens

List available Cluster tokens

This API call lists available tokens in your environment.

You can narrow down the output by adding parameters. The token has to match all the specified parameters.

You can also specify the limit of returned tokens.

This list may contain tokens which were created automatically (for example, InstallerDownload, Mobile, …) and are not visible on the Settings page. Deleting these might have unintended side-effects as they may still be in use.

Authentication

To execute this request, you need the Cluster token management (ClusterTokenManagement) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.

Endpoint

/api/cluster/v2/tokens

Parameters

ParameterTypeDescriptionInRequired
limitinteger

Limits the maximum number of returned tokens.

If not set the value of 1000 is used.

Maximum value is 1000000.

queryoptional
userstring

Filters the resulting set of tokens by user, who owns the token.

queryoptional
permissionsstring[]

Filters the resulting set of tokens by scopes assigned to the token.

You can specify several permissions in the following format: permissions=scope1&permissions=scope2. The token must have all the specified scopes.

The element can hold these values
  • ClusterTokenManagement
  • ControlManagement
  • DiagnosticExport
  • EnvironmentTokenManagement
  • ExternalSyntheticIntegration
  • Nodekeeper
  • ReadSyntheticData
  • ServiceProviderAPI
  • UnattendedInstall
  • activeGateTokenManagement.create
  • activeGateTokenManagement.read
  • activeGateTokenManagement.write
  • apiTokens.read
  • apiTokens.write
  • settings.read
  • settings.write
queryoptional
frominteger

Last used after this timestamp (UTC milliseconds).

queryoptional
tointeger

Last used before this timestamp (UTC milliseconds).

queryoptional

Response

Response codes

CodeTypeDescription
200StubList

Success

Response body objects

The StubList object

An ordered list of short representations of Dynatrace entities.

ElementTypeDescription
valuesEntityShortRepresentation[]

An ordered list of short representations of Dynatrace entities.

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

ElementTypeDescription
idstring

The ID of the Dynatrace entity.

namestring

The name of the Dynatrace entity.

descriptionstring

A short description of the Dynatrace entity.

Response body JSON model

json
{ "values": [ { "id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a", "name": "Dynatrace entity 1", "description": "Dynatrace entity 1 for the REST API example" }, { "id": "ee70f7d3-9a4e-4f5f-94d2-c9d6156f1618", "name": "Dynatrace entity 2" }, { "id": "8cdabe77-9e1a-4be8-b3df-269dd6fa9d7f" } ] }

Example

In this example, the request lists API tokens in the myManaged.cluster.com environment for user Pete with cluster token management permissions.

Curl

bash
curl -X GET "https://myManaged.cluster.com/api/cluster/v2/tokens?limit=1000&user=Pete&permissions=ClusterTokenManagement" -H "accept: application/json; charset=utf-8"

Request URL

plaintext
https://myManaged.cluster.com/api/cluster/v2/tokens?limit=1000

Response body

json
{ "values": [ { "id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a", "name": "Dynatrace entity 1", "description": "Dynatrace entity 1 for the REST API example" }, { "id": "ee70f7d3-9a4e-4f5f-94d2-c9d6156f1618", "name": "Dynatrace entity 2" }, { "id": "8cdabe77-9e1a-4be8-b3df-269dd6fa9d7f" } ] }

Response code

200