compute
POST /v1/compute/servers/{serverId}/packages
Put a website on a server.
Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja točka ne navodi određenu dozvolu u specifikaciji, stoga dajte svom ključu najmanje što mu je potrebno i provjerite odgovor umjesto da pretpostavljate.
Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
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> }'Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
serverId (path) | Uuid | Da | 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. |
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
domain | string | Da | The website's primary domain. |
package_type | string | Da | The id of a package type from `GET /v1/compute/servers/{serverId}/packages`. |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
id | string | Da | The provider's package identifier. |
domain | string | Da | The package's primary domain |
type_label | string | Da | The provider's label for the kind of package, or `""`. |
created_at | string | Da | ISO-8601 as the provider states it |
site_id | string | Da | **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,… |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 422 · 429 · 503