認証
ベアラー トークンとして API キーを送信します。キーには sites.view 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X POST https://api.zinndigital.com/v1/bulk-jobs \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "operation": <BulkOperation>, "selector": <BulkSelector> }'ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
Freezes the selection into a per-site work-list and starts a durable, idempotent workflow. The submit is instant and the work is not — this returns 202 as soon as the rows are written, and nothing a person is watching waits on the job itself. Only eligible sites are enrolled; ineligible ones are not written as pre-failed rows, because a report padded with rows that never had a chance makes the failures that matter harder to find. previewBulkJob is where you see them. A selection that enrolls nothing is a 422, not a job that completes instantly: "completed, 0 of 0" is indistinguishable from success on every screen that renders it. ⛔ A typed confirm phrase is required when the selector is wider than an explicit list (product_line, org) or the operation is weighty (plugin_remove, plugin_deactivate, blueprint_apply) at any size. previewBulkJob returns the exact phrase in confirmation_phrase. ⛔ All the selected sites must belong to one organization. A mixed selection is a 422 naming the problem rather than a job whose owner is a guess. Requires sites.view plus the operation's own key (see the tag description).
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
Idempotency-Key (header) | string | いいえ | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
operation | BulkOperation | はい | What a bulk job does to each of its sites. ⛔ One job model with an operation discriminator, not eight job models. A selection, a frozen work-list, a durable pass and a per-site… |
selector | BulkSelector | はい | Which sites a job targets. ⛔ There is no all. A job belongs to exactly one organization and all would span every tenant on the platform; the fleet-wide act is a staff… |
selector_value | string | いいえ | The selector's argument — a product-line code for product_line, an organization id for org, a site-group id for group. Ignored for sites, whose members are site_ids. |
site_ids | Uuid[] | いいえ | The explicit selection, for selector: sites. Every id is fenced to the organizations you can reach, so one belonging to somebody else resolves to nothing rather than to a… |
params | BulkJobParams | いいえ | The operation's arguments. Which keys are read depends on operation: plugin_install takes slugs + activate; plugin_activate, plugin_deactivate and plugin_remove take… |
confirm | string | いいえ | The typed confirmation phrase, required when previewBulkJob answers confirmation_required: true. Send exactly the value it returned in confirmation_phrase. ⛔ Whether it is… |
note | string | いいえ | Free text kept with the job, for whoever reads the report later. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
id | Uuid | はい | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | はい | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
operation | BulkOperation | はい | What a bulk job does to each of its sites. ⛔ One job model with an operation discriminator, not eight job models. A selection, a frozen work-list, a durable pass and a per-site… |
params | BulkJobParams | はい | The operation's arguments. Which keys are read depends on operation: plugin_install takes slugs + activate; plugin_activate, plugin_deactivate and plugin_remove take… |
selector | BulkSelector | はい | Which sites a job targets. ⛔ There is no all. A job belongs to exactly one organization and all would span every tenant on the platform; the fleet-wide act is a staff… |
selector_value | string | はい | — |
status | BulkJobStatus | はい | ⛔ partial is a real outcome, not a rounding of the other two. A job where 4 of 900 sites failed is neither a success nor a failure, and reporting it as either is how a bulk… |
requested_by | string | はい | Who asked for it. |
note | string | はい | — |
created_at | string | はい | — |
updated_at | string | はい | — |
settled_at | object | はい | When the job finished; null while it is still running. |
counts | BulkJobCounts | はい | — |
progress | BulkJobProgress | はい | How far along a job is, how fast it is going and how much longer it has. ⛔⛔ Every estimate here is nullable, and a null must never be rendered as 0. rate_per_minute: 0… |
このエンドポイントが返すエラー
401 · 403 · 409 · 422 · 429