次の割り当て済みジョブを取得する
POST /api/v1/jobs/claim
任意の sshInventory 設定は、ソースと限定フィンガープリントマップ付きで host-keys-v1(五接続)または host-keys-v2(十接続、スキャナー 0.26.90)を選択します。安定した claimId と instanceId が必要で、復旧時に変更できません。リモートインベントリには明示的なプールと実行承認も必要です。ローカル設定だけで baseline 実行は拡張できません。リモートプール取得には poolId、claimId、現在の instanceId が必要で、jobId は禁止です。明示的な現在のローカルプール広告とサーバー承認が必要で、通常取得でリモート作業は取得しません。リモートリースは短い固定期限で、更新でも延長しません。応答喪失後の再試行では安定した claimId とプロセスの instanceId を使用します。任意の jobId はその割り当てジョブのみを選び、他ジョブにフォールバックしません。取得受領は別のジョブ選択では再利用できません。任意の instanceId は最新 heartbeat と一致する必要があり、成功スキャン証拠をそのプロセスに結び付けます。エージェント当たりアクティブジョブは一つです。成功取得は最大 24 時間再実行可能ですが、終了リースは復活しません。
許可されるロール: agent.
認証
以下の OpenAPI の選択肢は、受け付ける認証方式を示します。ブラウザーからの変更には、正規の Origin ヘッダーも必要です。
[
{
"organizationCredential": []
},
{
"browserSession": []
}
]
パラメーター
[]
リクエスト本文
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"claimId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instanceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"jobId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"poolId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"sshInventory": {
"type": "object",
"properties": {
"profile": {
"type": "string",
"enum": [
"host-keys-v1",
"host-keys-v2"
]
},
"source": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"not": {
"const": "hosted-ssh"
}
},
"pins": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"pattern": "^(?:\\[[0-9a-fA-F:]+\\]|[a-zA-Z0-9][a-zA-Z0-9.-]*)(?::[0-9]{1,5})?$"
},
"additionalProperties": {
"type": "string",
"pattern": "^SHA256:[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]$"
},
"maxProperties": 256
}
},
"required": [
"profile",
"source"
],
"additionalProperties": false
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"poolId"
]
},
"then": {
"required": [
"claimId",
"instanceId"
],
"not": {
"required": [
"jobId"
]
}
}
},
{
"if": {
"required": [
"sshInventory"
]
},
"then": {
"required": [
"claimId",
"instanceId"
]
}
}
]
}
}
}
}
レスポンス
{
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"job": {
"anyOf": [
{
"$ref": "#/components/schemas/LeasedJob"
},
{
"type": "null"
}
]
}
},
"required": [
"job"
]
}
}
}
},
"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 を説明します。