検証済み設定リンクを引き換える
POST /api/enrollment/{tenantId}/{id}/redeem
正規の同一オリジン POST が必要です。リンク鍵はリクエスト本文に入れ、URL には入れないでください。コードは 10 分で期限切れとなり、引き渡しに結び付きます。引き渡し当たりコード送信は五回(少なくとも 60 秒間隔)、検証試行は合計五回です。期限切れ、取り消し済み、使用済みの引き渡しは 410 を返します。認証情報は一度だけ表示されます。引き換え応答を失った場合は、エージェントを取り消して新しい引き渡しを作成してください。
認証
この操作に認証済みセッションは不要です。Origin 検査とリクエスト制限は引き続き適用されます。
[]
パラメーター
[
{
"name": "tenantId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]
リクエスト本文
{
"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"
]
}
}
}
}
レスポンス
{
"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"
}
}
}
}
}
#/components/schemas/Asset などの参照は、共有スキーマで解決されます。クライアント生成には OpenAPI コントラクトをダウンロードしてください。このページは生成されたもので、計画中のエンドポイントではなく、実装済みの開発 API を説明します。