hosting

POST /v1/sites/deleted/{deletedSiteId}/restore

Restore a deleted site.

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

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

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

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

សាកល្បង

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

curl -X POST https://api.zinndigital.com/v1/sites/deleted/{deletedSiteId}/restore \
  -H "Authorization: Bearer zdk_live_…"

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

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

Brings a deleted site back. Answers `202` — the site is rebuilt by a workflow, and returns to `suspended` rather than `active` until it is actually serving again. ⛔ **The guard is re-evaluated on this request, never trusted from the button.** Between the list rendering and the click the customer may have recreated a site on the same domain, the retention window may have closed, or the purge may have run. A `422` carries the machine-readable reason (`no_backup`, `purged`, `domain_in_use`, `already_restored`, `abuse_hold`) so the client can say which it was. Requires `sites.create` as well as `sites.view`: a restore *creates* a live site.

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

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
deletedSiteId (path)Uuidបាទ/ចាសThe `DeletedSite` record id (not the site id).

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

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
idUuidបាទ/ចាសUUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idUuidបាទ/ចាសThe site this was. May no longer exist as a row.
org_idUuidបាទ/ចាសUUIDv7 identifier — sortable by creation time (docs/02 §8).
primary_domainstringបាទ/ចាស
reasonstring<dunning, customer, staff, abuse>បាទ/ចាសWhy it was deleted. `abuse` is restorable by staff only — a one-click customer restore of a site removed for terms enforcement would undo the enforcement.
deleted_atstringបាទ/ចាសSoft delete — removed from serving. The data is still here.
deleted_bystringទេ
purge_due_atstringទេ**When the backup is purged and the site becomes permanently unrecoverable.** ⛔ Computed by the engine from the live retention policy, by the same function the purge sweep selec…
purged_atstringទេHard delete. Non-null means the data is gone and no restore is possible.
restored_atstringទេ
restorablebooleanបាទ/ចាសWhether a restore would succeed **right now**. Reflects a real check that the backup object exists in storage — not a status column.
reason_codestring<, no_backup, purged, domain_in_use, already_restored, abuse_hold>បាទ/ចាសEmpty when restorable. Otherwise one of `no_backup`, `purged`, `domain_in_use`, `already_restored`, `abuse_hold`. ⛔ A **code**, rendered by the client through its own catalogue…

កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ

401 · 403 · 404 · 422 · 429 · 503