hosting
GET /v1/sites/{siteId}/directory-index
Get what a site serves when a visitor opens a folder.
Doğrulama
API açarını bearer token kimi göndərin. Açar sites.view icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…"Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
siteId (path) | Uuid | Bəli | Site ID (UUIDv7). |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
files | string[] | Bəli | The index file names, in the order the server tries them. |
listing_enabled | boolean | Bəli | 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 | Bəli | Whether the package type includes the directory-index controls. |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 429 · 503