Skip to content

Servers API ​

All endpoints below require Bearer-token authentication. Replace {id} with the numeric server ID returned by GET /servers.

List and inspect ​

GET /servers ​

List every server on the account.

bash
curl https://api.gigahost.no/api/v0/servers \
  -H "Authorization: Bearer $TOKEN"

The response contains an array of servers. Each entry includes the ID, hostname, primary IPs, status, plan, datacenter, and OS info.

GET /servers/{id} ​

Full server detail: CPU, storage, subnets, BGP sessions, order history, attack logs, bandwidth usage, IPMI session details.

PUT /servers/{id}/name ​

Rename the server.

FieldTypeDescription
namestringNew descriptive name. Cosmetic, does not change the OS hostname.
bash
curl -X PUT https://api.gigahost.no/api/v0/servers/14546/name \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-renamed-server"}'

Power control ​

GET /servers/{id}/powerstate
GET /servers/{id}/on
GET /servers/{id}/off
GET /servers/{id}/reboot

on, off and reboot return 200 with an empty data when the action was sent, 400 if it failed, and 403 while the server is suspended. They are GET requests but change the server, so an API key or user with read-only server access gets 403 You do not have permission for this operation.

bash
curl https://api.gigahost.no/api/v0/servers/14546/reboot \
  -H "Authorization: Bearer $TOKEN"

GET /servers/{id}/powerstate reports the state in meta:

json
{
  "meta": {
    "status": 200,
    "status_message": "200 OK",
    "powerstate": true,
    "timestamp": 1779843600
  },
  "data": []
}

Console (IPMI / KVM) ​

POST /servers/{id}/ipmi ​

Provision a temporary IPMI session (3-hour expiry by default). Dedicated servers only.

FieldTypeDescription
aclstringSemicolon-separated IPs / CIDRs allowed to reach the BMC.
bash
curl -X POST https://api.gigahost.no/api/v0/servers/3948/ipmi \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"acl": "203.0.113.10;198.51.100.0/24"}'

Response:

json
{
  "data": {
    "kvm_ip": "198.51.100.99",
    "username": "<generated>",
    "password": "<generated>"
  }
}

Credentials are returned once. Destroy the session and create a new one if you lose them.

Snapshots ​

GET /servers/{id}/snapshots ​

List snapshots for the server. Virtual servers only.

POST /servers/{id}/snapshot ​

FieldTypeDescription
namestringDescriptive name.

DELETE /servers/{id}/snapshot/{snap_id} ​

Delete a snapshot.

Bandwidth graphs ​

GET /servers/{id}/graphs/{type} ​

{type} is one of port_bits, port_percent, port_errors or port_upkts. Any other value falls back to port_bits.

bash
curl https://api.gigahost.no/api/v0/servers/14546/graphs/port_bits \
  -H "Authorization: Bearer $TOKEN"

Returns four PNG graphs as base64 strings: graph_day, graph_week, graph_month and graph_year in data. When no graph is available the response is 201 with an empty data.

IP addresses and reverse DNS ​

PUT /servers/{id}/reverse ​

Update a reverse-DNS record.

Single address:

FieldTypeDescription
ip_idnumberThe IPv4 address ID.
v4v6stringipv4 to set the PTR of the IPv4 address, ipv6 for the IPv6 address that belongs to it. Required; without it the call returns 400.
dnsstringFQDN to resolve to (server.example.com).

IPv6 routed /48 (delegate nameservers):

FieldTypeDescription
sub_idnumberSubnet ID.
dnsstringNameserver hostname (ns1.gigahost.no).
dns2 … dns5stringOptional. Further nameservers.

A value that is not a valid hostname returns 400 Submitted data is not a valid hostname or NS.

See Set up reverse DNS (PTR) on a routed /48 IPv6 for the end-to-end flow.

POST /servers/{id}/ipv4 ​

Order additional IPv4 addresses.

FieldTypeDescription
num_ipsnumberNumber of addresses to order.
ip_typestringl2 (layer-2, non-routed) or l3 (layer-3, routed).
bash
curl -X POST https://api.gigahost.no/api/v0/servers/14546/ipv4 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"num_ips": 1, "ip_type": "l2"}'

The number of additional IPs per server is capped. The cap is 5 unless support has set a different limit for your account. Past it the call returns 400 Max number of additional IPs reached. Contact support.; open a support ticket if you need more.

ISO management (KVM) ​

GET /servers/{id}/isos ​

List the ISOs on the account. They can be mounted on any of its KVM servers.

POST /servers/{id}/iso ​

Fetch an ISO from a URL. The account holds at most 3 ISOs.

FieldTypeDescription
urlstringURL whose path ends in .iso. It must point to a public address.

Returns 200 ISO is being uploaded. Errors (400): URL is not valid., URL not an ISO., URL must point to a public address on the internet., Max number reached (3).

POST /servers/{id}/mount ​

Mount an ISO as a CD drive and reboot the server from it.

FieldTypeDescription
iso_idnumberISO ID from GET /servers/{id}/isos.

POST /servers/{id}/dismount ​

Remove the ISO and reboot the server from its disk.

DELETE /servers/{id}/iso/{iso_id} ​

Delete an ISO. A mounted ISO cannot be deleted: 400 ISO is currently mounted.

Upgrade plan (KVM VPS) ​

GET /servers/{id}/upgrade ​

List packages the server can be upgraded to.

POST /servers/{id}/upgrade ​

FieldTypeDescription
product_idnumberTarget package, a product_id from GET /servers/{id}/upgrade.

Servers other than KVM cloud servers get 400 Upgrade is only available for cloud servers.

Reinstall OS ​

GET /reinstall/distro ​

List available Linux distributions for reinstall.

GET /reinstall/distro/{id} ​

List OS releases for a given distribution.

GET /reinstall/apps ​

List the one-click apps. An app is installed by passing its os_id to POST /servers/{id}/reinstall or to POST /deploy/servers, like an operating system. Apps install on top of Debian, on KVM and dedicated servers.

Each entry has os_id, os_name, os_logo (data URI), os_app_description and os_app_description_no, os_app_category, os_app_note and os_app_note_no, os_minram and os_min_disk (GB, 0 for no minimum), os_dedicated_only, os_app_domain (0 no domain field, 1 optional, 2 recommended) and os_app_version (the release last tested).

POST /servers/{id}/reinstall ​

Kick off a reinstall.

FieldTypeDescription
os_idnumberOperating-system ID (from /reinstall/distro/{id}).
languagestringOS language (e.g. en_US, nb_NO).
keyboardstringKeyboard layout (e.g. no, en).
timezonestringTZ database name (e.g. Europe/Oslo).
hostnamestringFully qualified hostname (web-01.example.com). Anything else is replaced by the server's primary IPv4 address.
ssh_keysarrayOptional. IDs of SSH keys on the account (see sshkeys in GET /account) to install for root, at most 10.
firstbootstringOptional. Script run once on the installed system at first boot, URL-encoded. With an app it runs after the app.
app_domainstringOptional, apps only. Domain for the app; it gets a Let's Encrypt certificate if it already points at the server.
app_emailstringOptional, apps only. Email address for certificate notices.
bash
curl -X POST https://api.gigahost.no/api/v0/servers/14546/reinstall \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "os_id": 12,
    "language": "en_US",
    "keyboard": "no",
    "timezone": "Europe/Oslo",
    "hostname": "web-prod-01.example.com",
    "ssh_keys": [1, 2]
  }'

Response:

json
{
  "meta": {
    "status": 200,
    "status_message": "200 OK",
    "message": "Server install has been initiated.",
    "reboot": true,
    "root_passwd": "<generated>",
    "sshkey": false
  },
  "data": []
}

The result fields are in meta, not data. The root password is returned once. When an SSH key was installed, sshkey is true and root_passwd is empty.

When os_id is an app, meta also holds app_run_id and app (name, url, admin_user, admin_password). Save the app login: the password is only available until the app has finished installing.

App errors:

Statusmeta.message
400Apps can only be installed on KVM servers and dedicated servers.
401This app is not available right now.
401This app is only available on dedicated servers.
401This app needs at least N GB of memory. / This app needs at least N GB of disk.
401The domain for the app is not a valid domain name.
401The email address for the app is not valid.

GET /servers/{id}/install ​

Follow an OS install (reinstall or deploy). Returns 404 The server is not being installed. when nothing is installing, including rescue boots.

json
{
  "data": {
    "step": "packages",
    "progress": 71,
    "done": 312,
    "total": 540,
    "date_started": 1779843600,
    "step_started": 1779844200,
    "stalled": false,
    "failed": false
  }
}

step is one of waiting, boot, loader, starting, disks, os, packages, configure, post or failed. progress runs from 0 to 100. done and total count installed packages when the installer reports them, otherwise they are null. stalled turns true when one step has taken far longer than usual (at least 30 minutes); contact support if it stays there.

GET /servers/{id}/app ​

The latest one-click app on the server. Returns 404 No app has been installed on this server. if there is none.

data holds app_run_id, os_id, name, logo, status (pending, running, completed, failed, timeout or aborted), step, progress, domain, url, version, admin_user, admin_password, note, note_no, date_created and date_completed. admin_password is only filled while the app is pending or running, and never for read-only access. Once the app is installed the login is in /root/app-info.txt on the server.

Gigahost Docs

This site is currently in development.
Enter the password to continue.