Zum Hauptinhalt springen

Verifizierten Einrichtungslink einlösen

POST /api/enrollment/{tenantId}/{id}/redeem

Kanonisches POST derselben Herkunft erforderlich. Der Link-Schlüssel gehört in den Anfrageinhalt, niemals in die URL. Codes laufen nach 10 Minuten ab und sind an die Übergabe gebunden. Fünf Code-Sendungen (mindestens 60 Sekunden Abstand) und insgesamt fünf Verifizierungsversuche pro Übergabe. Abgelaufene, widerrufene oder verbrauchte Übergaben geben 410 zurück. Die Zugangsdaten werden einmal angezeigt; widerrufe den Agent und erstelle eine neue Übergabe, wenn die Einlösungsantwort verloren geht.

Authentifizierung​

Dieser Vorgang erfordert keine authentifizierte Sitzung. Origin-Prüfungen und Anfragebegrenzungen gelten weiterhin.

[]

Parameter​

[
{
"name": "tenantId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]

Anfrageinhalt​

{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"key": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"code": {
"type": "string",
"pattern": "^[0-9]{6}$"
}
},
"required": [
"key",
"code"
]
}
}
}
}

Antworten​

{
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"agentId": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"kind": {
"type": "string"
},
"token": {
"type": "string"
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"relay": {
"type": "object",
"properties": {
"configuration": {
"type": "object",
"additionalProperties": true
},
"bootstrapToken": {
"type": "string"
},
"bootstrapExpiresAt": {
"type": "integer"
},
"bootstrapMaxUses": {
"type": "integer"
}
},
"required": [
"configuration",
"bootstrapToken",
"bootstrapExpiresAt",
"bootstrapMaxUses"
]
}
},
"required": [
"agentId",
"name",
"kind",
"token",
"expiresAt"
]
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Missing/expired/revoked credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Insufficient role",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "State or idempotency conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "Body too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported media type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Request budget exhausted; respect Retry-After",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"Retry-After": {
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Seconds until sufficient budget is expected; concurrent traffic may consume replenished capacity."
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}

Referenzen wie #/components/schemas/Asset werden in den gemeinsamen Schemas aufgelöst. Lade den OpenAPI-Vertrag zur Clientgenerierung herunter. Diese Seite wird generiert; sie beschreibt die implementierte Entwicklungs-API, keine geplanten Endpunkte.