hosting

POST /v1/bulk-jobs

Run one operation across many sites.

Tous les points de terminaison hosting

Toute la documentation pour développeurs

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation sites.view ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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> }'

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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).

Paramètres

NomTypeObligatoireQu'est-ce que c'est
Idempotency-Key (header)stringNonClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
operationBulkOperationOuiWhat 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…
selectorBulkSelectorOuiWhich 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_valuestringNonThe 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_idsUuid[]NonThe 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…
paramsBulkJobParamsNonThe operation's arguments. Which keys are read depends on operation: plugin_install takes slugs + activate; plugin_activate, plugin_deactivate and plugin_remove take…
confirmstringNonThe typed confirmation phrase, required when previewBulkJob answers confirmation_required: true. Send exactly the value it returned in confirmation_phrase. ⛔ Whether it is…
notestringNonFree text kept with the job, for whoever reads the report later.

Réponse

NomTypeObligatoireQu'est-ce que c'est
idUuidOuiUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidOuiUUIDv7 identifier — sortable by creation time (docs/02 §8).
operationBulkOperationOuiWhat 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…
paramsBulkJobParamsOuiThe operation's arguments. Which keys are read depends on operation: plugin_install takes slugs + activate; plugin_activate, plugin_deactivate and plugin_remove take…
selectorBulkSelectorOuiWhich 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_valuestringOui
statusBulkJobStatusOuipartial 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_bystringOuiWho asked for it.
notestringOui
created_atstringOui
updated_atstringOui
settled_atobjectOuiWhen the job finished; null while it is still running.
countsBulkJobCountsOui
progressBulkJobProgressOuiHow 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

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 409 · 422 · 429