API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console

POST /v1/agents/enrollment-tokens

POST/v1/agents/enrollment-tokens

Create a new enrollment token

Corps de la requête

NomTypeDescription
labelobligatoirestringHuman-readable label for the token (e.g. "Büro München GPO")
typeobligatoirestringToken type: installer (auto-enrollment) or key (manual entry)
maxEnrollmentsintegerMaximum number of agents that can enroll with this token
expiresAtstring<date-time>Token expiry timestamp (null = never expires)
capabilitiesstring[]Capabilities granted to agents enrolled with this token (null = defaults)

Exemple

curl -X POST https://api.codemeta-os.de/v1/agents/enrollment-tokens \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "label": "string",
  "type": "installer",
  "maxEnrollments": 0,
  "expiresAt": "string",
  "capabilities": []
}'
const result = await cm.agents.post({
  "label": "string",
  "type": "installer",
  "maxEnrollments": 0,
  "expiresAt": "string",
  "capabilities": []
});

Codes de réponse

HTTP Signification
200 Default Response

Recherche