hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
Autentifikatsiya
API kalitini bearer token sifatida yuboring. Kalit sites.create ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.
Bu yakuniy nuqta hech qanday tashkilot identifikatorini qabul qilmaydi. Sizning kalitingiz unga tegishli tashkilotni allaqachon aniqlaydi va javob shunga qarab cheklanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/rename-domain \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "new_domain": <Hostname> }'Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
Starts the durable **rename-domain** saga for a site (new-side setup → flip → old-side teardown, register #91). Returns `202 Accepted` immediately — the work runs as a Temporal workflow; poll the site or subscribe to `site.*` events for completion. Requires `sites.create` (the same authority that provisions a site). Idempotent on the site: a repeat call while the saga is running is accepted and does not start a second run.
Parametrlar
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
siteId (path) | Uuid | Ha | Site ID (UUIDv7). |
Soʻrov tanasi
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
new_domain | Hostname | Ha | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | Yo'q | Keep serving the old domain as an alias of the site after the flip. |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
site_id | Uuid | Ha | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | Ha | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | Ha | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | Ha | The saga was accepted; poll the site / `site.*` events for completion. |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 404 · 409 · 422 · 429 · 503