API reference
Workflows
Cases, waits and resumption, schedules, event subscriptions and webhooks.
Generated from the public API contract (OpenAPI). Descriptions in the contract are written in Japanese.
Endpoints
Section titled “Endpoints”listCases
Section titled “listCases”GET/v1/workflows/cases
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
status |
query | CaseStatus | ||
workflow |
query | string | ||
subject_id |
query | string | ||
business_key |
query | string | ||
limit |
query | integer |
Responses
Section titled “Responses”- 200 —
object: Case - default —
Problem: RFC 9457 Problem Details
listOutcomes
Section titled “listOutcomes”GET/v1/workflows/outcomes
workflows:read が必要。案件が完了条件に達した成果。同じ案件の同じ完了条件の成果は 1 件だけで、 完了のイベントが届き直しても増えない。新しいものから返す
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
case_id |
query | string | ||
workflow |
query | string | ||
limit |
query | integer | ||
cursor |
query | string | 前のページの next_cursor |
Responses
Section titled “Responses”- 200 —
object: 成果 - default —
Problem: RFC 9457 Problem Details
getCase
Section titled “getCase”GET/v1/workflows/cases/{id}
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes |
Responses
Section titled “Responses”- 200 —
object: Case と経過と待機と、Case が動いている Workflow の定義 - default —
Problem: RFC 9457 Problem Details
cancelCase
Section titled “cancelCase”POST/v1/workflows/cases/{id}/cancel
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | |
Idempotency-Key |
header | string | 副作用を伴う POST ではサーバーが必須にする。SDK は無ければ自動で付けるので、型では省略できる |
Request body
Section titled “Request body”application/json
| Name | Type | Required | Description |
|---|---|---|---|
reason |
string | yes |
Responses
Section titled “Responses”- 200 —
Case: Case - default —
Problem: RFC 9457 Problem Details
retryCase
Section titled “retryCase”POST/v1/workflows/cases/{id}/retry
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | |
Idempotency-Key |
header | string | 副作用を伴う POST ではサーバーが必須にする。SDK は無ければ自動で付けるので、型では省略できる |
Responses
Section titled “Responses”- 200 —
Case: Case - default —
Problem: RFC 9457 Problem Details
restartCase
Section titled “restartCase”POST/v1/workflows/cases/{id}/restart
workflows:operate が必要。有効なバージョンで始め直す。今の案件(実行中・待機中・失敗)を取り消し、同じ Workflow と 対象のレコードで、いまの有効な ReleaseBundle の案件を始めて返す。今の案件の定義は書き換えない。今の案件がすでに 有効なバージョンで動いているとき、有効なバージョンにその Workflow がないときは CONFLICT
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | |
Idempotency-Key |
header | string | 副作用を伴う POST ではサーバーが必須にする。SDK は無ければ自動で付けるので、型では省略できる |
Responses
Section titled “Responses”- 200 —
Case: 始めた案件 - default —
Problem: RFC 9457 Problem Details
listWorkflowDefinitions
Section titled “listWorkflowDefinitions”GET/v1/workflows/definitions
Responses
Section titled “Responses”- 200 —
object: 有効なバージョンの Workflow - default —
Problem: RFC 9457 Problem Details
listSchedules
Section titled “listSchedules”GET/v1/workflows/schedules
Responses
Section titled “Responses”- 200 —
object: スケジュール - default —
Problem: RFC 9457 Problem Details
triggerSchedule
Section titled “triggerSchedule”POST/v1/workflows/schedules/{name}/trigger
手動で発火する(発火の日は今日)
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | |
Idempotency-Key |
header | string | 副作用を伴う POST ではサーバーが必須にする。SDK は無ければ自動で付けるので、型では省略できる |
Responses
Section titled “Responses”- 200 —
ScheduleRun: 発火の結果 - default —
Problem: RFC 9457 Problem Details
pauseSchedule
Section titled “pauseSchedule”POST/v1/workflows/schedules/{name}/pause
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | |
Idempotency-Key |
header | string | 副作用を伴う POST ではサーバーが必須にする。SDK は無ければ自動で付けるので、型では省略できる |
Responses
Section titled “Responses”- 200 —
Schedule: スケジュール - default —
Problem: RFC 9457 Problem Details
resumeSchedule
Section titled “resumeSchedule”POST/v1/workflows/schedules/{name}/resume
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | |
Idempotency-Key |
header | string | 副作用を伴う POST ではサーバーが必須にする。SDK は無ければ自動で付けるので、型では省略できる |
Responses
Section titled “Responses”- 200 —
Schedule: スケジュール - default —
Problem: RFC 9457 Problem Details
listEventSubscriptions
Section titled “listEventSubscriptions”GET/v1/workflows/event-subscriptions
workflows:read が必要。プロジェクトと環境の、消していない購読の一覧。一時停止しているものも含む
Responses
Section titled “Responses”- 200 —
object: 購読の一覧 - default —
Problem: RFC 9457 Problem Details
createEventSubscription
Section titled “createEventSubscription”POST/v1/workflows/event-subscriptions
workflows:event-subscriptions.manage が必要。イベントを webhook で届ける購読を登録する。 宛先は HTTPS の公開された DNS の名前だけ。署名の秘密値はこの応答でしか返さない。同じ名前の消していない購読があれば 409 にする。 Idempotency-Key は使わない(応答に秘密値を含むので保存しない)。監査が止まっている間は 503 にする
Request body
Section titled “Request body”application/json — EventSubscriptionInput
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | yes | プロジェクトの中で一意な名前 |
url |
string | yes | 配信の宛先。HTTPS の公開された DNS の名前だけ |
event_types |
PublishedEventType[] | yes |
Responses
Section titled “Responses”- 201 —
object: 登録した購読と署名の秘密値 - default —
Problem: RFC 9457 Problem Details
getEventSubscription
Section titled “getEventSubscription”GET/v1/workflows/event-subscriptions/{id}
workflows:read が必要
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes |
Responses
Section titled “Responses”- 200 —
EventSubscription: 購読 - default —
Problem: RFC 9457 Problem Details
updateEventSubscription
Section titled “updateEventSubscription”PATCH/v1/workflows/event-subscriptions/{id}
workflows:event-subscriptions.manage が必要。宛先と type を変える。名前と署名の秘密値は変えない。 終わっていない配信は新しい宛先へ送り、type を外しても変える前に作った配信は届ける。宛先を変えると失敗の数を数え直す。 If-Match が要る。監査が止まっている間は 503 にする
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | |
If-Match |
header | string | yes | 取得したときの ETag(version) |
Request body
Section titled “Request body”application/json — EventSubscriptionChange
| Name | Type | Required | Description |
|---|---|---|---|
url |
string | 配信の宛先。HTTPS の公開された DNS の名前だけ | |
event_types |
PublishedEventType[] |
Responses
Section titled “Responses”- 200 —
EventSubscription: 変えた購読 - default —
Problem: RFC 9457 Problem Details
deleteEventSubscription
Section titled “deleteEventSubscription”DELETE/v1/workflows/event-subscriptions/{id}
workflows:event-subscriptions.manage が必要。購読を消し、終わっていない配信を取り消し、署名の秘密値を消す。 配信の記録は保持の日数まで読める
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes |
Responses
Section titled “Responses”- 204: 消した
- default —
Problem: RFC 9457 Problem Details
rotateEventSubscriptionSecret
Section titled “rotateEventSubscriptionSecret”POST/v1/workflows/event-subscriptions/{id}/rotate-secret
workflows:event-subscriptions.manage が必要。署名の秘密値を替え、新しい値を返す。24 時間は新旧 2 つの値で署名するので (webhook-signature に空白で区切って並べる)、受け手はその間に新しい値へ移る。その間にまた回すと、いちばん古い値はすぐに消える。 Idempotency-Key は使わない(応答に秘密値を含むので保存しない)
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes |
Request body
Section titled “Request body”application/json
Responses
Section titled “Responses”- 200 —
object: 新しい署名の秘密値 - default —
Problem: RFC 9457 Problem Details
resumeEventSubscription
Section titled “resumeEventSubscription”POST/v1/workflows/event-subscriptions/{id}/resume
workflows:event-subscriptions.manage が必要。一時停止した購読を再開する。再開を待つ配信と、受け手が失敗し始めてから届かなかった配信を、 同じ webhook-id で少しずつ送り直す。止まっていなければ何も変えない。監査が止まっている間は 503 にする
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes |
Request body
Section titled “Request body”application/json
Responses
Section titled “Responses”- 200 —
EventSubscription: 再開した購読 - default —
Problem: RFC 9457 Problem Details
listWebhookDeliveries
Section titled “listWebhookDeliveries”GET/v1/workflows/event-subscriptions/{id}/deliveries
workflows:read が必要。購読の配信の記録を新しい順に返す。購読を消した後も保持の日数まで読める
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | |
limit |
query | integer | ||
cursor |
query | string |
Responses
Section titled “Responses”- 200 —
object: 配信の記録 - default —
Problem: RFC 9457 Problem Details
getWebhookDelivery
Section titled “getWebhookDelivery”GET/v1/workflows/event-subscriptions/{id}/deliveries/{delivery}
workflows:read が必要。配信の記録と、送るたびの結果。受け手の応答の本文は残さない。 再送の回数を使い切った配信は、/v1/audit/dead-letters の入れ直しでもう一度送る
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | |
delivery |
path | string | yes |
Responses
Section titled “Responses”- 200 —
object: 配信の記録 - default —
Problem: RFC 9457 Problem Details