hosting

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

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

Toate punctele finale hosting

Autentificare

Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea sites.view; o cheie care nu o are va fi respinsă cu 403, nu 404.

Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.

Încearcă

Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API

Detalii

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

Parametri

NumeTipObligatoriuCe este
siteId (path)UuidDaSite ID (UUIDv7).

Corp cerere

NumeTipObligatoriuCe este
filesstring[]NuThe 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_enabledbooleanNuWhether a folder with no index file lists its contents. Omit, or send null, to leave it untouched.

Răspuns

NumeTipObligatoriuCe este
filesstring[]DaThe index file names, in the order the server tries them.
listing_enabledbooleanDaWhether 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…
permittedbooleanDaWhether the package type includes the directory-index controls.

Erori pe care le poate returna acest punct final

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