hosting

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

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

Alle hosting-eindpunten

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 PUT https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

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

⛔ **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`.

Parameters

NaamTypeVerplichtWat dit is
siteId (path)UuidJaSite ID (UUIDv7).

Aanvraaglichaam

NaamTypeVerplichtWat dit is
filesstring[]NeeThe 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 li…
listing_enabledbooleanNeeWhether a folder with no index file lists its contents. Omit, or send null, to leave it untouched.

Reactie

NaamTypeVerplichtWat dit is
filesstring[]JaThe index file names, in the order the server tries them.
listing_enabledbooleanJaWhether 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…
permittedbooleanJaWhether the package type includes the directory-index controls.

Fouten die dit eindpunt kan retourneren

401 · 403 · 404 · 409 · 422 · 429 · 503