hosting

POST /v1/sites/{siteId}/databases/{databaseId}/password

Set a new password on a site database's user.

すべての hosting エンドポイント

認証

ベアラー トークンとして API キーを送信します。キーには sites.view 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/databases/{databaseId}/password \
  -H "Authorization: Bearer zdk_live_…"

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く

詳細

Generates a new password for the database's user, sets it at the vendor, and returns it **once**. Before this operation existed the only remedy for a lost database password was `deleteSiteDatabase` followed by a fresh create — data loss offered as a password reset. ⛔ **`POST`, and there is deliberately no `GET`.** The password is generated for this call and stored nowhere, so there is nothing a second read could return. The response is the one on this surface that carries a live credential: it is served to the one principal entitled to the site, and a client must hold it in component state until the customer confirms they have saved it — never in a query cache, which would let it survive the dismissal and land in any state snapshot taken for support. `404` for a site with no vendor hosting package, one that is not the caller's, or a database id that is not on it. Requires `sites.view` **and** `sites.panel_access`, the same key that governs creating and dropping the database it belongs to.

パラメータ

名前タイプ必須これがその内容です
siteId (path)UuidはいSite ID (UUIDv7).
databaseId (path)stringはいThe database id returned by `listSiteDatabases`.

返信

名前タイプ必須これがその内容です
database_idstringはいThe database's id at the vendor, as `listSiteDatabases` reports it.
database_namestringはいThe database's name. The vendor namespaces it per package on some package types, so this — not what was requested when it was created — is what a client shows.
usernamestringはいThe user the password belongs to.
passwordstringはいThe new password, in cleartext, returned exactly once.

このエンドポイントが返すエラー

401 · 403 · 404 · 422 · 429 · 503