Skip to main content
POST
/
v1
/
clusters
/
{id}
/
worker_bootstrap
Generate worker join command and cloud-init
curl --request POST \
  --url https://api.cnap.tech/v1/clusters/{id}/worker_bootstrap \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expiry_seconds": 3600
}
'
{
  "token": "<string>",
  "expires_at": 123,
  "token_placeholder": "<string>",
  "cmd_template": "<string>",
  "cmd": "<string>",
  "cloud_init_template": "<string>",
  "cloud_init": "<string>"
}

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Path Parameters

id
string
required

Cluster ID

Body

application/json
expiry_seconds
integer
default:3600

Token expiry in seconds (default 3600, max 86400)

Required range: 60 <= x <= 86400

Response

Worker bootstrap info

token
string
required

Short-lived join token

expires_at
number
required

Token expiry (unix seconds)

token_placeholder
string
required

Placeholder string in templates

cmd_template
string
required

Bootstrap command with token placeholder

cmd
string
required

Bootstrap command with real token (ready to run)

cloud_init_template
string
required

Cloud-init YAML with token placeholder

cloud_init
string
required

Cloud-init YAML with real token (ready to use)