Skip to content
Odinex Cloud
API reference

API overview

Base URL, authentication, requests, pagination and conventions of the Odinex Cloud API.

The Odinex Cloud API is a JSON REST API. The console, the odx CLI and the Terraform provider all use it, so anything you can do in the console you can do with the API. The pages in this section are generated from the OpenAPI specification of the API.

Base URL

https://api.odinex.cloud/v1

Authentication

Send a project API token as a bearer token:

curl -H "Authorization: Bearer $ODX_TOKEN" https://api.odinex.cloud/v1/servers

A token only sees its own project. read tokens can only read; read_write tokens can also make changes.

Some endpoints need no token: /regions, /server_types, /load_balancer_types, /pricing and /status. The sections under Console session (authentication, account, projects, billing and support) only work with a console session, not with tokens.

Requests and responses

  • Request and response bodies are JSON; send Content-Type: application/json with a body.
  • IDs are integers. Wherever a request refers to another resource (an image, a server type, an SSH key, a network…) you can usually give its name or its ID, as the field's description says.
  • Timestamps are ISO 8601 strings.
  • Money is a decimal string in euros, e.g. "4.000000". Prices are objects with net, gross and currency.
  • Creating something returns 201 with the new resource and, if work is still going on, an action. Deleting returns 204 or an action.
  • Updating a resource with PUT changes only the fields you send; labels, when sent, replace all labels.
  • Errors use one envelope: {"error": {"code", "message", "details"}}.

Pagination

List endpoints take page (from 1) and per_page (1–50, default 25) and return a meta.pagination object:

{
  "servers": [],
  "meta": {
    "pagination": { "page": 1, "per_page": 25, "previous_page": null, "next_page": 2, "last_page": 3, "total_entries": 61 }
  }
}

Keep requesting next_page until it is null.

Filtering

Many list endpoints filter by name, and most by label_selector, e.g. ?label_selector=env=prod,role=web (URL-encode = as %3D if your client doesn't).

Limits

Requests count against the rate limit of 3600 per hour per project; every response carries RateLimit-* headers. Resource counts are capped by your organization's limits.

Example: create a server and wait for it

resp=$(curl -s -X POST https://api.odinex.cloud/v1/servers \
  -H "Authorization: Bearer $ODX_TOKEN" -H "Content-Type: application/json" \
  -d '{"name": "web-1", "server_type": "t1", "image": "ubuntu-24.04", "location": "fra1", "ssh_keys": ["laptop"]}')
action=$(echo "$resp" | jq .action.id)

until [ "$(curl -s -H "Authorization: Bearer $ODX_TOKEN" \
  https://api.odinex.cloud/v1/actions/$action | jq -r .action.status)" != running ]; do sleep 2; done

curl -s -H "Authorization: Bearer $ODX_TOKEN" \
  https://api.odinex.cloud/v1/servers/$(echo "$resp" | jq .server.id) | jq .server.public_net

On this page