hosting
PUT /v1/sites/{siteId}/wordpress/maintenance
Turn maintenance mode on or off.
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 PUT https://api.zinndigital.com/v1/sites/{siteId}/wordpress/maintenance \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "enabled": <boolean> }'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
Hides the site behind WordPress's maintenance page, or brings it back. ⛔ Confirmed by re-reading the flag, never by acknowledging our own request. The flag is a file in the document root, and a write that failed on a full disk or a read-only mount exits cleanly on some hosts — so acknowledging would tell a customer their shop is hidden while it is serving orders, or the reverse. ⛔ {"enabled": bool} both ways, rather than two paths or a bare boolean body, so a client cannot turn maintenance mode on by sending a body it meant as "off". ⛔ Fleet only — refused where wp_maintenance is false. Requires sites.view and sites.panel_access.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
enabled | boolean | Da | Whether the site should show the maintenance page. |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
enabled | boolean | Da | True when visitors are seeing the maintenance page. |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 422 · 429 · 503