compute
POST /v1/compute/servers/{serverId}/packages
Put a website on a server.
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/compute/servers/{serverId}/packages \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "domain": <string>, "package_type": <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 hosting package on the machine. This does not charge. The machine's package allowance at the provider is unlimited and the money was spent when the server was bought, so this is gated on sites.create and deliberately not on the billing key. A separate, reseller-wide call buys a standalone hosting product; this is not it. A domain the provider rejects - not a valid name, or already hosted on the account - returns 422 and creates nothing.
Paraméterek
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
serverId (path) | Uuid | Igen | The server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
domain | string | Igen | The website's primary domain. |
package_type | string | Igen | The id of a package type from GET /v1/compute/servers/{serverId}/packages. |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | string | Igen | The provider's package identifier. |
domain | string | Igen | The package's primary domain |
type_label | string | Igen | The provider's label for the kind of package, or "". |
created_at | string | Igen | ISO-8601 as the provider states it |
site_id | string | Igen | Our site id for this website, or "" when we hold no record of it. This is what makes the website openable: every site surface - SSL, FTP, databases, subdomains, PHP, cron,… |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 404 · 422 · 429 · 503