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/v0Append 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
POSTandPUTrequests must send a JSON-encoded body andContent-Type: application/json, unless the endpoint says otherwise (POST /bgp/asnis form-encoded). - BIND zone-file import takes
multipart/form-data. - URL-encode special characters in path parameters. Usernames are email addresses, so
+becomes%2Band@becomes%40.
Response format
Every JSON response wraps the payload in a meta envelope:
{
"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:
{
"meta": {
"status": 400,
"status_message": "400 Bad Request",
"message": "ASN is not valid"
}
}Common HTTP status codes:
| Code | Meaning |
|---|---|
200 | OK |
201 | Created |
400 | Bad Request: payload or parameter validation failed |
401 | Unauthorized: missing or invalid token |
403 | Forbidden: token valid but no permission for this resource |
404 | Not Found |
500 | Server Error |
Postman collection
The Postman v2.1 collection has every endpoint on these pages.
- Download
gigahost-api.postman_collection.jsonand import it into Postman. - Set the collection variables
usernameandpasswordto your Gigahost login. - Run
Authentication → Authenticateonce. 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.

