hosting
PUT /v1/sites/{siteId}/directory-index
Set a site's index files, its folder listing, or both.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই sites.view অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
⛔ 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 list… |
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