POST /v1/agents/enrollment-tokens
POST/v1/agents/enrollment-tokens
Create a new enrollment token
Request Body
| Name | Typ | Beschreibung |
|---|
labelerforderlich | string | Human-readable label for the token (e.g. "Büro München GPO") |
typeerforderlich | string | Token type: installer (auto-enrollment) or key (manual entry) |
maxEnrollments | integer | Maximum number of agents that can enroll with this token |
expiresAt | string<date-time> | Token expiry timestamp (null = never expires) |
capabilities | string[] | Capabilities granted to agents enrolled with this token (null = defaults) |
Beispiel
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": []
});
Antwortcodes
| HTTP |
Bedeutung |
200 |
Default Response |