Create an ActiveGate token in Dynatrace with the Fleet Management API with a name, expiration date, and seed token option; the response contains its secret.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/activegate/tokens |
You use this operation to create an ActiveGate token. The request body sets its name, expirationDate, and seedToken fields, and the new token is owned by the user who calls the API. A 201 response contains the token secret, which you can't retrieve again later, so store it securely right away.
To execute this request, you need a platform token or OAuth access token with one of the following scopes:
fleet-management:activegate.tokens:createfleet-management:activegate.tokens:writeTo learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Active | The JSON body of the request. Contains the parameters of the new ActiveGate token. | body | Required |
ActiveGateTokenCreate objectParameters of a new ActiveGate token.
| Element | Type | Description | Required |
|---|---|---|---|
| expirationDate | string | The expiration date of the token. You can use one of the following formats:
If not set, the token never expires. Ensure that it's not set in the past and doesn't exceed | Optional |
| name | string | The name of the token. | Required |
| seedToken | boolean | The token is a seed token ( We recommend the individual token option (false). | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"expirationDate": "now+6M","name": "myToken","seedToken": false}
| Code | Type | Description |
|---|---|---|
| 201 | Active | Success. The token has been created. The response body contains the token secret. |
| 4XX | Error | Client side error. |
| 5XX | Error | Server side error. |
ActiveGateTokenCreated objectThe newly created ActiveGate token.
| Element | Type | Description |
|---|---|---|
| expirationDate | string | The token expiration date in ISO 8601 format ( |
| id | string | The ActiveGate token identifier, consisting of the prefix and public parts of the token. |
| seedToken | boolean | The token is a seed token ( |
| token | string | The secret of the token. Make sure to copy it-—-you won't be able to retrieve it again. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| constraintViolations | Constraint | A list of constraint violations |
| message | string | The error message |
ConstraintViolation objectA list of constraint violations
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"expirationDate": "2020-11-24T08:15:30.144Z","id": "dt0g02.4KWZO5EF","seedToken": false,"token": "dt0g02.4KWZO5EF.XT47R5DRADJIZUFOX4UDNOKTSUSABGLN7XSMJG7UXHRXKNY4WLORH4OF4T75MG7E"}
{"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}