hosting
PUT /v1/sites/{siteId}/wordpress/maintenance
Turn maintenance mode on or off.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Кілтте sites.view рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.
Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
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> }'Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз
Мәліметтер
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`.
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
siteId (path) | Uuid | Иә | Site ID (UUIDv7). |
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
enabled | boolean | Иә | Whether the site should show the maintenance page. |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
enabled | boolean | Иә | True when visitors are seeing the maintenance page. |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 404 · 422 · 429 · 503