compute
POST /v1/compute/servers/{serverId}/packages
Put a website on a server.
Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
serverId (path) | Uuid | Sim | 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. |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
domain | string | Sim | The website's primary domain. |
package_type | string | Sim | The id of a package type from `GET /v1/compute/servers/{serverId}/packages`. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Sim | The provider's package identifier. |
domain | string | Sim | The package's primary domain |
type_label | string | Sim | The provider's label for the kind of package, or `""`. |
created_at | string | Sim | ISO-8601 as the provider states it |
site_id | string | Sim | **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,… |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422 · 429 · 503