compute
POST /v1/compute/servers/{serverId}/packages
Put a website on a server.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.
Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
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> }'Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
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.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
serverId (path) | Uuid | Так | 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. |
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
domain | string | Так | The website's primary domain. |
package_type | string | Так | The id of a package type from `GET /v1/compute/servers/{serverId}/packages`. |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
id | string | Так | The provider's package identifier. |
domain | string | Так | The package's primary domain |
type_label | string | Так | The provider's label for the kind of package, or `""`. |
created_at | string | Так | ISO-8601 as the provider states it |
site_id | string | Так | **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,… |
Помилки, які може повертати ця кінцева точка
401 · 403 · 404 · 422 · 429 · 503