compute

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

Put a website on a server.

Բոլոր compute վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer թոքեն։ Այս վերջնակետը բնութագրում չի նշում որոշակի թույլտվության մասին, ուստի տվեք ձեր բանալուն նվազագույն անհրաժեշտը և ենթադրություններ անելու փոխարեն ստուգեք պատասխանը:

Այս վերջնակետը կազմակերպության ID չի ընդունում: Ձեր բանալին արդեն իսկ նույնականացնում է այն կազմակերպությունը, որին պատկանում է, և պատասխանը սահմանափակված է դրանով:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

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 վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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.

Հարցման մարմին

ԱնունՏեսակՊահանջվում էԻնչ է դա
domainstringԱյոThe website's primary domain.
package_typestringԱյոThe id of a package type from `GET /v1/compute/servers/{serverId}/packages`.

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
idstringԱյոThe provider's package identifier.
domainstringԱյոThe package's primary domain
type_labelstringԱյոThe provider's label for the kind of package, or `""`.
created_atstringԱյոISO-8601 as the provider states it
site_idstringԱյո**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