hosting
GET /v1/sites/{siteId}/directory-index
Get what a site serves when a visitor opens a folder.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie sites.view beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…"Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
siteId (path) | Uuid | Ja | Site ID (UUIDv7). |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
files | string[] | Ja | The index file names, in the order the server tries them. |
listing_enabled | boolean | Ja | 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 | Ja | Whether the package type includes the directory-index controls. |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 429 · 503