hosting
PUT /v1/sites/{siteId}/directory-index
Set a site's index files, its folder listing, or both.
認証
ベアラー トークンとして API キーを送信します。キーには sites.view 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/directory-index \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
⛔ **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`.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
siteId (path) | Uuid | はい | Site ID (UUIDv7). |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
files | string[] | いいえ | The 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_enabled | boolean | いいえ | Whether a folder with no index file lists its contents. Omit, or send null, to leave it untouched. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
files | string[] | はい | The index file names, in the order the server tries them. |
listing_enabled | boolean | はい | 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 | はい | Whether the package type includes the directory-index controls. |
このエンドポイントが返すエラー
401 · 403 · 404 · 409 · 422 · 429 · 503