compute

POST /v1/compute/servers/{serverId}/packages

Put a website on a server.

Wszystkie punkty końcowe compute

Wszystkie dokumentacje dla programistów

Uwierzytelnianie

Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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> }'

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Parametry

NazwaTypWymaganeCo to jest
serverId (path)UuidTakThe 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.

Treść żądania

NazwaTypWymaganeCo to jest
domainstringTakThe website's primary domain.
package_typestringTakThe id of a package type from GET /v1/compute/servers/{serverId}/packages.

Odpowiedź

NazwaTypWymaganeCo to jest
idstringTakThe provider's package identifier.
domainstringTakThe package's primary domain
type_labelstringTakThe provider's label for the kind of package, or "".
created_atstringTakISO-8601 as the provider states it
site_idstringTakOur 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,…

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 422 · 429 · 503