Create an auth token
/api/auth-tokensCreates an auth token. The secret is generated by the server and returned in spec.token
in this response only; store it, because no later read returns it. The request must not
carry spec.token: a request that sends one returns 400.
metadata.labels["dash0.com/id"] must not be set. metadata.labels["dash0.com/origin"] must be
unique in your organization and must not be a UUID; a machine token that has no user gets an
api-<uuid> origin when none is given. The origin cannot be changed afterwards. apiVersion is
required; a missing or unsupported value returns 400.
Sample requestcurl --request POST 'https://api.eu-west-1.aws.dash0.com/api/auth-tokens' \
--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"apiVersion": "dash0.com/v1alpha1",
"kind": "Dash0AuthToken",
"metadata": {
"name": "Example"
},
"spec": {}
}'Request body required
Version of the auth token document format. Required on create and update; the only
supported value is dash0.com/v1alpha1, and any other value returns 400. Returned on
every read.
"Dash0AuthToken"A field omitted on create takes its default, except actions, which create requires. A field
omitted on update keeps its stored value. Clients must accept enum values they do not
recognize.
Responses
The auth token was created.