hosting
POST /v1/sites/bulk-vendor-operation
Run one hosting-platform operation across many of your sites at once.
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ sites.view។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។
ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។
សាកល្បង
ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។
curl -X POST https://api.zinndigital.com/v1/sites/bulk-vendor-operation \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "operation": <string<block_ip, cache_purge, malware_scan, sitemap>>, "site_ids": <Uuid[]> }'បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API
ព័ត៌មានលម្អិត
Purge caches, fetch malware-scan results, regenerate sitemaps or set IP blocks for a whole selection of sites in **one call to the underlying hosting platform**, instead of one call per site. ⛔ **This is a rate-limit control, not a convenience.** The upstream platform limits by source IP — the one thing an API key cannot smooth — so 400 sites purged one at a time is 400 requests through a shared outbound pool that every other integration also uses. Here it is 8. `vendor_calls` in the response is that number, returned so a client can see the guarantee holding; if it ever equals the number of sites, the batching has regressed. ⛔⛔ **The response is per site and is never a bare success.** The platform answers per package and a batch can come back partially acknowledged, so results arrive in three disjoint lists that add up to `requested`: `succeeded` (the vendor confirmed it), `failed` (the vendor was asked and did not confirm, or the batch errored) and `skipped` (we could not ask at all — the site is not on a vendor hosting package, or it has no recorded package id). A client that renders only `succeeded` will tell a customer about 42 sites when they selected 50. ⚠️ Only site ids are accepted, never vendor package ids: a package id is an integer anyone could type and the upstream platform would act on it regardless of which customer it belongs to. Ids are resolved inside the caller's own organisation. ⛔ Two of the platform's bulk operations are deliberately **not** offered. Country-blocking appends a line to the site's `.htaccess` on every call and never removes it, so it is not safe behind a retry — set it per site instead. Bulk deletion would bypass the quarantine, audit and undo that the normal delete flow provides. Asking for either answers `422` naming the reason and the alternative. Requires `sites.view` and `sites.restart`.
សំណើរបស់រាងកាយ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
operation | string<block_ip, cache_purge, malware_scan, sitemap> | បាទ/ចាស | Which platform operation to run. ⛔ A closed set, not a passthrough — a client cannot name an upstream path. `block_country` and `delete` are deliberately absent and answer `422`… |
site_ids | Uuid[] | បាទ/ចាស | The sites to act on, in the caller's own organisation. ⚠️ Site ids only — never vendor package ids. |
ផ្អាកដំណើរការ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
operation | string | បាទ/ចាស | The operation that was run. |
requested | integer | បាទ/ចាស | How many sites were asked for. ⛔ `succeeded + failed + skipped` always equals this — the three lists are disjoint and complete, so a client can never quietly lose a site. |
succeeded | BulkVendorSiteResult[] | បាទ/ចាស | — |
failed | BulkVendorSiteResult[] | បាទ/ចាស | Asked for, and the platform did not confirm it. |
skipped | BulkVendorSiteResult[] | បាទ/ចាស | Could not be asked about at all — not on a vendor hosting package, or no recorded package id. Neither a success nor a failure, and shown to the customer as its own outcome. |
vendor_calls | integer | បាទ/ចាស | How many upstream calls this took. The whole point of the endpoint is that this is much smaller than `requested`. |
កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ
401 · 403 · 422 · 429