hosting

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

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

جميع نقاط نهاية hosting

جميع مستندات المطورين

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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

التفاصيل

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