compute
POST /v1/compute/servers/{serverId}/packages
Put a website on a server.
Autentifikimi
Drgoni një çelës API si një token mbajtës. Ky pikëndalim nuk specifikon një leje specifike në specifikim, prandaj jepini çelësit tuaj minimumin e nevojshëm dhe kontrolloni përgjigjen në vend që të supozoni.
Ky pikëndalim nuk pranon id të organizatës. Çelësi juaj tashmë identifikon organizatën së cilës i përket dhe përgjigjja kufizohet vetëm për atë.
Provoje
Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.
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> }'Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së
Detajet
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.
Parametrat
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
serverId (path) | Uuid | Po | 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. |
Trupi i kërkesës
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
domain | string | Po | The website's primary domain. |
package_type | string | Po | The id of a package type from `GET /v1/compute/servers/{serverId}/packages`. |
Përgjigja
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
id | string | Po | The provider's package identifier. |
domain | string | Po | The package's primary domain |
type_label | string | Po | The provider's label for the kind of package, or `""`. |
created_at | string | Po | ISO-8601 as the provider states it |
site_id | string | Po | **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,… |
Gabimet që ky pikëndalim mund të kthejë
401 · 403 · 404 · 422 · 429 · 503