hosting
POST /v1/bulk-jobs/installed-plugins
What is already installed across a bulk selection.
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ sites.view។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។
ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។
សាកល្បង
ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។
curl -X POST https://api.zinndigital.com/v1/bulk-jobs/installed-plugins \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "operation": <string<plugin_activate, plugin_deactivate, plugin_remove, plugin_update>>, "selector": <BulkSelector> }'បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API
ព័ត៌មានលម្អិត
The candidate list for `plugin_activate`, `plugin_deactivate`, `plugin_remove` and `plugin_update` — read from the **sites themselves**, not from the wordpress.org directory. Installing picks from what could go on; activating picks from what is already there, and those are different questions. **POST, and it writes nothing.** Same reason as `previewBulkJob` beside it: an explicit selection of 400 site ids does not survive a query string that proxies, browsers and access logs will truncate or record. No row is written and no job is started. ⛔ **This is one network call per site, so it reads a bounded SAMPLE and says so.** `matched` counts the whole selection, `eligible` counts the ones that could take the operation, and `read` counts the ones actually listed — three separate numbers, because a blind version of this endpoint would return `read: 0`, which must never be readable as *"nothing is installed"*. Sites that could not be reached are named in `unreadable` rather than dropped into a shorter list that looks complete. `uniform` is `false` when the read sites do not all carry the same plugins, so the screen can say that plainly instead of silently acting on a subset. Requires `sites.view` plus the operation's own key — never a cheaper door than the single-site listing.
សំណើរបស់រាងកាយ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
operation | string<plugin_activate, plugin_deactivate, plugin_remove, plugin_update> | បាទ/ចាស | ⛔ Only the operations that act on something already installed. Anything else is a `422` — there is nothing to list, and the directory search is the right tool. |
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 operat… |
selector_value | string | ទេ | The product line, for `selector: product_line`. |
site_ids | string[] | ទេ | — |
sample | integer | ទេ | How many sites to read. A **latency** bound on an interactive read, not a capacity plan: the response reports what it did not reach, and the bulk job that follows covers the who… |
ផ្អាកដំណើរការ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
operation | string | បាទ/ចាស | — |
matched | integer | បាទ/ចាស | Sites the selection resolves to, counted over the whole selection. |
eligible | integer | បាទ/ចាស | Of those, how many could take the operation at all. |
read | integer | បាទ/ចាស | How many were actually listed. ⛔ The number that makes an empty `data` interpretable: `0` means *we looked at nothing*, never *nothing is installed*. |
sampled | boolean | បាទ/ចាស | True when the selection is larger than what was read. |
uniform | boolean | បាទ/ចាស | False when the read sites do not all carry the same plugins. Computed here rather than by the client, because it decides what the customer is told. |
data | BulkInstalledPlugin[] | បាទ/ចាស | — |
unreadable | object[] | បាទ/ចាស | Sites in the selection whose plugins could not be listed. ⛔ Reported, never dropped — a shorter list that looks complete is worse than a short list that says so. |
កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ
401 · 403 · 422 · 429