Create enrollment token
Creates an enrollment token.
Body Required
Request parameters for the enrollment token
-
roles array[string]
The additional services for which this enrollment token applies (empty if not specified, ie system services only)
-
Whether this token can subsequently to its grant be revoked from the UI
-
validity_in_seconds integer(int32)
The time in seconds for which this token is valid (defaults to 1 hour). Currently this can only be set for ephemeral (persistent: false) tokens.
Responses
-
A token has been generated that can be used to start new servers with the requested roles
-
The token request format was invalid, details in the error (code: 'enrollment_tokens.invalid_token_request')
-
No signing key is available to generate a token (code: 'enrollment_tokens.signing_key_not_found')
POST
/platform/configuration/security/enrollment-tokens
curl \
-X POST https://{{hostname}}/api/v1/platform/configuration/security/enrollment-tokens \
-d '{"roles":["string"],"persistent":true,"validity_in_seconds":42}'
Request examples
{
"roles": [
"string"
],
"persistent": true,
"validity_in_seconds": 42
}
Response examples (200)
{
"token": "string",
"token_id": "string"
}
Response examples (400)
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (403)
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}