Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem 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> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
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.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
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. |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
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`. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
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,… |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 422 · 429 · 503