Documentation Index
Fetch the complete documentation index at: https://docs.shannon.run/llms.txt
Use this file to discover all available pages before exploring further.
エンドポイント
POST http://localhost:8080/api/v1/tasks/{id}/resume
一時停止されたタスクを再開します。ワークフローは最後のチェックポイントから続行され、通常通り進行します。
必要: はい
ヘッダーにAPIキーを含めてください:
X-API-Key: sk_test_123456
リクエスト
ヘッダー
| ヘッダー | 必要 | 説明 |
|---|
X-API-Key | はい | API認証キー |
Content-Type | いいえ | ボディがある場合はapplication/json |
traceparent | いいえ | W3Cトレースコンテキスト |
パスパラメータ
| パラメータ | タイプ | 必要 | 説明 |
|---|
id | string | はい | タスクID(TemporalワークフローID) |
ボディパラメータ
| パラメータ | タイプ | 必要 | 説明 |
|---|
reason | string | いいえ | オプションの再開理由ノート |
リクエストボディの例
{
"reason": "User approved continuation"
}
レスポンス
202 Accepted
{
"success": true,
"message": "Resume signal sent",
"task_id": "task-123"
}
404 Not Found
{ "error": "Task not found" }
409 Failed Precondition
無効な状態でタスクを再開できません:
{ "error": "cannot resume completed task" }
{ "error": "cannot resume failed task" }
{ "error": "cannot resume cancelled task" }
{ "error": "cannot resume timed out task" }
{ "error": "task is not paused" }
401 / 403
{ "error": "Unauthorized" }
または
注意事項
- 現在一時停止されているタスクにのみ効果があります。非一時停止タスクに対して
resumeを呼び出すと、409 Failed Preconditionエラーが返されます。
- 状態検証により、無効な操作(例:完了したタスクやすでに実行中のタスクの再開)に対して明確なエラーメッセージが提供されます。
- SSEストリームは、一時停止されたワークフローが再開されると
workflow.resumedを発信します。