hosting

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

Turn maintenance mode on or off.

ყველა hosting ენდპოინტი

ავტორიზაცია

API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს sites.view ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.

ეს ბოლო წერტილი არ იღებს ორგანიზაციის იდენტიფიკატორს. თქვენი გასაღები უკვე აიდენტიფიცირებს იმ ორგანიზაციას, რომელსაც ის ეკუთვნის, და პასუხი შემოფარგლულია მისით.

სცადეთ

შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.

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-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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