hosting
POST /v1/sites/{siteId}/protection/file-permissions
Apply the vendor's recommended permissions on a site.
Autentifikacija
Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu sites.view; ključ bez nje se odbija s kodom 403, a ne 404.
Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/protection/file-permissions \
-H "Authorization: Bearer zdk_live_…"Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
Changes file modes on the customer's **live** files to the vendor's own recommendation. ⛔ **It takes no body, and that is the security property.** The check is re-run inside the same vendor conversation and the recommendation is applied against the handle that conversation just produced, so a stale `check_id` from a client cannot be replayed against files that have changed since. The only defensible input to an operation that alters file modes is the number the platform running it published moments ago. A report with nothing to fix is a `422` refusal rather than a silent success: *"we changed nothing"* and *"there was nothing to change"* are different sentences, and only one of them is reassuring. Files the vendor named without naming a mode are skipped, never sent with a guess. `404` for a site with no vendor hosting package. Requires `sites.view` and `sites.panel_access`.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
check_id | integer | Da | The vendor's handle for this check. **Null** when the vendor gave us none, in which case there is nothing to apply and `actionable` is false. ⛔ A client never sends it back: `fi… |
public_html_wrong | boolean | Da | Whether the document root's own mode is wrong. |
root_wrong | boolean | Da | Whether the package root's own mode is wrong. |
failures | SitePermissionFailure[] | Da | The individual files the check flagged. |
actionable | boolean | Da | Whether *Fix these* can do anything: a live check handle **and** something to fix. Its own field so the button is not offered against a report that can only be refused. |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 409 · 422 · 429 · 503