hosting

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

Take a site into or out of maintenance.

ចំណុចបញ្ចប់ hosting ទាំងអស់

ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ

បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ sites.view។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។

ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។

សាកល្បង

ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/maintenance-mode \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": <boolean> }'

បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API

ព័ត៌មានលម្អិត

Switches every alias at once and returns the whole new state, so the client re-renders from the server's answer rather than from what it asked for. `PUT` because the body states the desired end state: sending the same value twice is the same site. ⛔ The customer's own maintenance-page HTML travels with the vendor's row, and this operation carries it through unchanged. A toggle built from scratch blanks it, replacing a page the customer wrote with a default one — which is why the write reads the existing row first. Turning it **on** takes the site off the internet for every visitor, so the client confirms before calling. Requires `sites.view` **and** `sites.panel_access`. `404` for a site with no managed hosting package.

ប៉ារ៉ាម៉ែត្រ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
siteId (path)Uuidបាទ/ចាសSite ID (UUIDv7).

សំណើរបស់រាងកាយ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
enabledbooleanបាទ/ចាសWhether visitors should be shown the maintenance page. There is no third value: `getSiteMaintenanceMode` may report a mixed set of aliases, but a caller asking to change it must…

ផ្អាកដំណើរការ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
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 · 409 · 422 · 429 · 503