hosting
PUT /v1/sites/{siteId}/directory-index
Set a site's index files, its folder listing, or both.
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ sites.view។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។
ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។
សាកល្បង
ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API
ព័ត៌មានលម្អិត
⛔ **An omitted field means *leave it alone*.** Each control sends only itself: resending `files` alongside a listing change would write back a list the screen may have rendered from a stale read and clobber an edit somebody else made. A body with neither field is a no-op, not an error. Turning folder listing **on** publishes the names of every file in any folder with no index page, which on a site with backups or exports in the document root is a disclosure — so the client says that before calling. The whole new state is returned either way. `404` for a site with no managed hosting package. Requires `sites.view` and `sites.panel_access`.
ប៉ារ៉ាម៉ែត្រ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
siteId (path) | Uuid | បាទ/ចាស | Site ID (UUIDv7). |
សំណើរបស់រាងកាយ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
files | string[] | ទេ | The index file names, in the order the server tries them. Plain file names only — a path or a wildcard is refused `422` before the vendor is called. Omit to leave the current li… |
listing_enabled | boolean | ទេ | Whether a folder with no index file lists its contents. Omit, or send null, to leave it untouched. |
ផ្អាកដំណើរការ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
files | string[] | បាទ/ចាស | The index file names, in the order the server tries them. |
listing_enabled | boolean | បាទ/ចាស | Whether a folder with no index file lists its contents. **Null** when the vendor does not report it — distinct from `false`, because a switch rendered from an unknown lies about… |
permitted | boolean | បាទ/ចាស | Whether the package type includes the directory-index controls. |
កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ
401 · 403 · 404 · 409 · 422 · 429 · 503