hosting
PUT /v1/sites/{siteId}/directory-index
Set a site's index files, its folder listing, or both.
प्रमाणीकरण
बेरर टोकन म्हणून API की पाठवा. की मध्ये sites.view परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.
या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.
प्रयत्न करा
कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.
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 विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा
तपशील
⛔ **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