hosting

PUT /v1/sites/{siteId}/wordpress/maintenance

Turn maintenance mode on or off.

Բոլոր hosting վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա sites.view թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Այս վերջնակետը կազմակերպության ID չի ընդունում: Ձեր բանալին արդեն իսկ նույնականացնում է այն կազմակերպությունը, որին պատկանում է, և պատասխանը սահմանափակված է դրանով:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

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 վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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`.

Պարամետրեր

ԱնունՏեսակՊահանջվում էԻնչ է դա
siteId (path)UuidԱյոSite ID (UUIDv7).

Հարցման մարմին

ԱնունՏեսակՊահանջվում էԻնչ է դա
enabledbooleanԱյոWhether the site should show the maintenance page.

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
enabledbooleanԱյոTrue when visitors are seeing the maintenance page.

Այս վերջնակետի կողմից վերադարձվող սխալները

401 · 403 · 404 · 422 · 429 · 503