compute
POST /v1/compute/servers/{serverId}/packages
Put a website on a server.
Authenticatie
Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
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> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
serverId (path) | Uuid | Ja | 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. |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
domain | string | Ja | The website's primary domain. |
package_type | string | Ja | The id of a package type from `GET /v1/compute/servers/{serverId}/packages`. |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | string | Ja | The provider's package identifier. |
domain | string | Ja | The package's primary domain |
type_label | string | Ja | The provider's label for the kind of package, or `""`. |
created_at | string | Ja | ISO-8601 as the provider states it |
site_id | string | Ja | **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,… |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 422 · 429 · 503