hosting
GET /v1/sites/{siteId}/directory-index
Get what a site serves when a visitor opens a folder.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền sites.view; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…"Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
One resource over two vendor settings, because it is one idea to the customer: the ordered list of index files tried in a folder, and whether a folder with none of them lists its contents instead. `listing_enabled` is **null** when the vendor does not report it — distinct from `false`, because a switch rendered from an unknown is a switch that lies about the customer's site and invites them to turn on what may already be on. Requires `sites.view`. `404` for a site with no managed hosting package.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
siteId (path) | Uuid | Có | Site ID (UUIDv7). |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
files | string[] | Có | The index file names, in the order the server tries them. |
listing_enabled | boolean | Có | 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 | Có | Whether the package type includes the directory-index controls. |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 429 · 503