hosting
POST /v1/wordpress/sites/{siteId}/credentials/rotate
Set a new password on one WordPress administrator, shown once.
Doğrulama
API açarını bearer token kimi göndərin. Açar sites.view icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X POST https://api.zinndigital.com/v1/wordpress/sites/{siteId}/credentials/rotate \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "user_id": <string> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
Generates a 24-character password, applies it to the named WordPress administrator, and returns it in this response and **nowhere else** — it is not stored, not written to the snapshot, and not put in the audit record, which says a rotation happened and never what to. ⛔ A user id that is not an administrator of this site is `422`. Without that check the endpoint would reset any WordPress account's password through a door labelled *administrators*. Requires `sites.view` **and** `sites.panel_access`.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
siteId (path) | Uuid | Bəli | Site ID (UUIDv7). |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
user_id | string | Bəli | The WordPress user id, from `getWordPressSiteCredentials`. |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
user_id | string | Bəli | — |
login | string | Bəli | — |
password | string | Bəli | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 422 · 429 · 503