hosting

PUT /v1/sites/{siteId}/directory-index

Set a site's index files, its folder listing, or both.

सभी hosting एंडपॉइंट्स

सभी डेवलपर दस्तावेज़

प्रमाणन

बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास sites.view अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।

यह एंडपॉइंट कोई संगठन आईडी नहीं लेता है। आपकी कुंजी पहले से ही उस संगठन की पहचान करती है जिससे वह संबंधित है, और प्रतिक्रिया उसी के दायरे में है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

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).

अनुरोध बॉडी

नामप्रकारआवश्यकयह क्या है
filesstring[]नहीं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 list…
listing_enabledbooleanनहींWhether a folder with no index file lists its contents. Omit, or send null, to leave it untouched.

प्रतिक्रिया

नामप्रकारआवश्यकयह क्या है
filesstring[]हाँThe index file names, in the order the server tries them.
listing_enabledbooleanहाँ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…
permittedbooleanहाँWhether the package type includes the directory-index controls.

त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है

401 · 403 · 404 · 409 · 422 · 429 · 503