Deploy API
Order new servers and follow them until they are ready. All endpoints require Bearer-token authentication; an API key needs read/write access to Deploy to order. The panel-side flow is described in Deploying a server.
An order is real: it creates an order and, for monthly, quarterly and annual terms, an invoice.
GET /deploy/servers
The catalogue: what can be ordered, where, and whether the account can pay for it.
curl https://api.gigahost.no/api/v0/deploy/servers \
-H "Authorization: Bearer $TOKEN"data holds:
tiers: product groups, each withgroup_id,group_name,in_stockandproducts.regionsanddatacenters: the locations used by the products. A datacenter hasdc_id,dc_name,region_id,region_name,region_name_short,region_location,region_countryandregion_icon.currency:NOK.eligibility: the payment checks behind hourly orders (verified,has_method,method_qualifies,has_paid_invoice,qualifies_arrears,credit_nokand the hourly usage this month).
Each product has, among other fields:
| Field | Description |
|---|---|
product_id, price_id | Pass both to POST /deploy/servers. |
type | vm, dedicated or auction. |
in_stock, built_to_order, waitlist_eligible | Stock state. A product that is sold out and not built to order can only be reserved. |
allow_hourly, allow_recurring | Which billing periods the product accepts. |
rate_hourly, rate_monthly, setup | Prices in NOK excluding VAT. |
region_ids, dc_ids | Regions and datacenters the product can be placed in. |
dc_stock | Object of dc_id → true/false: whether the product is in stock in that datacenter. |
specs | CPU, memory, disks and bandwidth. |
The operating systems come from GET /reinstall/distro and the one-click apps from GET /reinstall/apps.
POST /deploy/servers
Order one or more servers.
| Field | Type | Required | Description |
|---|---|---|---|
pid | number | Yes | product_id from the catalogue. |
price_id | number | Yes | price_id of the same product. |
dc_id | number | One of dc_id or region_id | Datacenter to deploy in. Sets the region. |
region_id | number | One of dc_id or region_id | Region to deploy in, any datacenter. |
os_id | number | One of os_id, iso_id or rescue | Operating system or one-click app. |
iso_id | number | ISO on the account to boot from. Cloud servers only. | |
rescue | number | 1 to start the server in rescue mode. | |
billing_period | string | No | hourly (default), monthly, quarterly or annual. |
quantity | number | No | Number of servers, default 1. |
hostnames | array | No | One hostname per server. Only letters, digits, ., _ and -, up to 253 characters. |
ssh_keys | array | No | IDs of SSH keys on the account (see sshkeys in GET /account). Without a key a root password is generated. |
firstboot | string | No | Plain-text script run once on the installed system at first boot, at most 32768 bytes. With an app it runs after the app. |
app_domain | string | No | Apps only. Domain for the app. Only with quantity 1. |
app_email | string | No | Apps only. Email address for certificate notices. |
backups | number | No | 1 to add backups. Cloud servers only. |
coupon_code | string | No | Discount code. Ignored on hourly orders. |
waitlist | string | No | reserve or notify for a sold-out product. See Waitlist. |
curl -X POST https://api.gigahost.no/api/v0/deploy/servers \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pid": 123,
"price_id": 456,
"dc_id": 1,
"os_id": 12,
"billing_period": "monthly",
"hostnames": ["web-01.example.com"],
"ssh_keys": [42]
}'Response (excerpt):
{
"data": {
"success": true,
"message": "Servers queued for deployment.",
"order_ids": [98765],
"order_numbers": ["100234"],
"quantity": 1,
"billing_period": "monthly",
"currency": "NOK"
}
}Keep order_ids to follow the servers with GET /deploy/status. A monthly, quarterly or annual order also returns the prices, pending_payment and under_review. An hourly order returns rate_hourly and monthly_cap.
The hostname you send becomes the panel name. The OS hostname is built from it: it is lowercased and cut at the first character other than a letter, digit, . or -. An empty result gives srv<id>.gigahost.no.
Datacenter errors
meta.message | When |
|---|---|
Required field is invalid: dc_id | dc_id is not a number. |
Datacenter was not found. | Unknown dc_id. |
Product is not available in the selected datacenter. | The product is not offered there; check dc_ids. |
Product is out of stock in the selected datacenter. | Another datacenter still has stock; check dc_stock. |
Not enough stock in the selected datacenter to deploy N server(s). | Dedicated servers: fewer free units than quantity. |
A product that is built to order, or that you reserve on the waitlist, ignores dc_id and is placed by region.
App errors
meta.message | When |
|---|---|
This app is not available right now. | The app is switched off. |
Apps can only be installed on KVM servers and dedicated servers. | The product is an LXC container. |
This app is only available on dedicated servers. | The app needs a dedicated server. |
Required field is invalid: app_domain | Not a valid domain name. |
Required field is invalid: app_email | Not a valid email address. |
One domain cannot be used for several servers. Order them one at a time, or leave the domain empty. | app_domain with quantity above 1. |
The memory and disk minimums of an app (os_minram, os_min_disk) are checked when the server is installed; choose a product that meets them.
Other errors
Required field is invalid: hostnamesFirstboot script is too large.Choose an operating system, an ISO, or rescue mode.This product cannot be ordered hourly./This product cannot be ordered on a recurring term.Product is out of stock./Not enough stock to deploy N server(s).Please complete your account profile before ordering.Hourly servers require a non-prepaid card or PayPal on file plus at least one paid invoice on your account …(seeeligibilityin the catalogue)
Waitlist
When a product is sold out everywhere and waitlist_eligible is true, send waitlist:
reserveholds an order that deploys automatically when capacity frees up. You are billed when the server is deployed.notifyonly sends you an email when the product is available again.
GET /deploy/status
Follow the servers of one or more orders.
curl "https://api.gigahost.no/api/v0/deploy/status?ids=98765,98766" \
-H "Authorization: Bearer $TOKEN"ids is a comma-separated list of order_ids. data.servers has one entry per server with order_id, order_number, hostname, srv_id, ip, ipv6, status, password, app and install_progress. data.all_ready turns true when every server has reached a final state.
status | Meaning |
|---|---|
waiting | The order waits for payment. |
waitlist | Reserved; deploys when capacity frees up. |
deploying | The server is being set up. |
installing | The operating system is installing. install_progress has the same shape as GET /servers/{id}/install. |
ready | Done. |
rescue / iso | Started in rescue mode or from an ISO. |
password is the root password while the install runs, when no SSH key was chosen, and in rescue mode. It is not returned to read-only API keys. app holds the app login (name, url, admin_user, admin_password) while an app installs; admin_password is empty for read-only API keys. Neither is kept afterwards.

