Skip to content

API Overview ​

The Gigahost API is a JSON REST API for what you do in Flux: servers, DNS, domains, BGP, billing and your account.

Base URL ​

https://api.gigahost.no/api/v0

Append the resource path, for example https://api.gigahost.no/api/v0/servers.

Authentication ​

Send a bearer token from POST /authenticate, or an API key, in the Authorization header. See Authentication.

Request format ​

  • All POST and PUT requests must send a JSON-encoded body and Content-Type: application/json, unless the endpoint says otherwise (POST /bgp/asn is form-encoded).
  • BIND zone-file import takes multipart/form-data.
  • URL-encode special characters in path parameters. Usernames are email addresses, so + becomes %2B and @ becomes %40.

Response format ​

Every JSON response wraps the payload in a meta envelope:

json
{
  "meta": {
    "status": 200,
    "status_message": "200 OK"
  },
  "data": {
    "...": "..."
  }
}

Some endpoints return their result fields in meta instead of data; the reference pages show which.

Error format ​

Errors have the same shape, with a non-2xx status and a message:

json
{
  "meta": {
    "status": 400,
    "status_message": "400 Bad Request",
    "message": "ASN is not valid"
  }
}

Common HTTP status codes:

CodeMeaning
200OK
201Created
400Bad Request: payload or parameter validation failed
401Unauthorized: missing or invalid token
403Forbidden: token valid but no permission for this resource
404Not Found
500Server Error

Postman collection ​

The Postman v2.1 collection has every endpoint on these pages.

  1. Download gigahost-api.postman_collection.json and import it into Postman.
  2. Set the collection variables username and password to your Gigahost login.
  3. Run Authentication → Authenticate once. It stores the token in , and every other request uses it.

Set server_id, zone_id and asn_id to point the requests at your own resources.

Gigahost Docs

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