hosting

GET /v1/sites/{siteId}/maintenance-mode

Get whether a site is serving its maintenance page.

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

Բոլոր մշակողների փաստաթղթերը

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

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

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

Փորձել

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

curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/maintenance-mode \
  -H "Authorization: Bearer zdk_live_…"

Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում

Մանրամասներ

Whether visitors are being shown the maintenance page instead of the site, per alias. enabled is true only when every alias is in maintenance: one alias still serving is a live site, and a single rounded boolean would hide it from the customer who thinks they took the shop down. available says whether the package exposes the control at all, and permitted whether the package type includes it, so the client can explain rather than offer a switch whose request is already known to be refused. Requires sites.view — whether a site is in maintenance is a fact a support agent needs to answer a ticket, not a secret. 404 for a site with no managed hosting package.

Պարամետրեր

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

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
availablebooleanԱյոWhether the package exposes maintenance mode at all. False renders an explanation rather than an empty list.
enabledbooleanԱյոtrue only when every alias is in maintenance. One alias still serving is a live site, and a single rounded boolean would hide that from a customer who believes they took…
aliasesSiteMaintenanceAlias[]ԱյոEach alias on the package and its own state.
permittedbooleanԱյոWhether the package type includes maintenance mode. An absent vendor capability is a refusal, never an assumption that it is probably on.

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

401 · 403 · 404 · 429 · 503