Skip to content

Create a one-time join token for an agent

POST
/api/v1/join-tokens
curl --request POST \
--url http://localhost:8080/api/v1/join-tokens \
--header 'Content-Type: application/json' \
--header 'X-Brokerium-Request: 1' \
--cookie brokerium_session=<brokerium_session> \
--data '{ "nodeName": "example", "clusterId": "example", "nodeId": "example", "ttlMinutes": 60 }'

Role: operator. Returns the install command for the host. Without nodeName the node is named after the host name its agent reports at enrollment, with -2, -3, … when that name is taken. With nodeId the token enrolls an existing node again, which keeps its id, name and assignment; nodeName and clusterId must be empty then.

X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
nodeName
string
/^[A-Za-z0-9._-]{1,63}$/
clusterId

Reserves the new node for this cluster.

string | null
nodeId

The node to enroll again.

string
ttlMinutes
integer
default: 60 >= 1 <= 10080

Token and install command.

Media typeapplication/json
object
token
required
string
expiresAt
required
string format: date-time
command
required
string

Example generated

{
"token": "example",
"expiresAt": "2026-04-15T12:00:00Z",
"command": "example"
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

not_found: no node has the nodeId.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.