実行状態の取得
Squadbase API 経由で Automation の実行状態をポーリングします。
GET
https://api.squadbase.dev/v0/automation/{projectId}/{automationName}/executions/{executionId}Automation の実行 で開始した実行の現在の状態を返します。status が終了状態(COMPLETED・FAILED・TIMED_OUT・CANCELLED)になるまでポーリングし、その後 実行結果の取得 を行います。
リクエストヘッダー
Prop
Type
Required
パスパラメータ
Prop
Type
Required
レスポンス — 200 OK
実行オブジェクト を返します。実行が終わると、消費した AIクレジットの合計(creditsCharged)が含まれます。
{
"executionId": "uuid",
"projectId": "uuid",
"automationName": "daily-sales-alert",
"status": "COMPLETED",
"title": null,
"message": null,
"startedAt": "ISO8601",
"completedAt": "ISO8601",
"createdAt": "ISO8601",
"creditsCharged": 0.42
}呼び出し例
curl 'https://api.squadbase.dev/v0/automation/<PROJECT_ID>/<AUTOMATION_NAME>/executions/<EXECUTION_ID>' \
-H 'x-api-key: <YOUR_API_KEY>'executionId が存在しない場合や、path の Automation に属していない場合は 422 を返します。詳しくは エラー を参照してください。