hosting
POST /v1/sites/{siteId}/clone
Copy this site onto a new domain, as a new site.
Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. Ez a végpont nem határoz meg konkrét jogosultságot a specifikációban, ezért adja meg a kulcsnak a legkevesebbet, amire szüksége van, és a feltételezés helyett ellenőrizze a választ.
Ez a végpont nem fogad el szervezeti azonosítót. Az Ön kulcsa már azonosítja azt a szervezetet, amelyhez tartozik, és a válasz is erre vonatkozik.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/clone \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "primary_domain": <string> }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
Creates a new site on the same plan, product line, stack and region as this one, takes a copy of this site's files and database, and restores that copy onto the new site once it has finished being built — then points the copy's stored web addresses (a WordPress database names its own URLs) at the new domain. This site is only read, never changed. ⭐ A clone is a site blueprint capture and a blueprint deploy in one call, so it is durable end to end and every guard those enforce applies here. The copy is kept as a blueprint named after both domains, and progress is read from GET /v1/sites/{siteId}/clones. The copy's backup does not spend the on-demand backup allowance: a clone is paid for with a site slot, which is checked exactly as POST /v1/sites checks it. A refusal from that check (no slot left, the domain taken) creates nothing. Refusals carry a machine code in error.details[0].code: site_not_active and clone_not_supported (422), backup_in_flight (409). ⛔ "As staging" is a different product — a private copy on the SAME site that publishes back — and lives at /v1/sites/{siteId}/wordpress/staging. Requires both sites.create and sites.blueprint.manage: it spends a site slot and it reads this site's whole content into a copy.
Paraméterek
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
siteId (path) | Uuid | Igen | Site ID (UUIDv7). |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
primary_domain | string | Igen | The new site's domain. It must not be in use by any site. |
name | string | Nem | A name for the new site in your site list. Defaults to the domain. |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
site | Site | Igen | — |
clone | SiteClone | Igen | — |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 404 · 409 · 422 · 429 · 503