hosting
GET /v1/sites/{siteId}/directory-index
Get what a site serves when a visitor opens a folder.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran sites.view; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…"Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
siteId (path) | Uuid | Ya | Site ID (UUIDv7). |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
files | string[] | Ya | The index file names, in the order the server tries them. |
listing_enabled | boolean | Ya | 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 | Ya | Whether the package type includes the directory-index controls. |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 429 · 503