Skip to content

API Conventions

The rules that hold across every endpoint: how collections page, how errors are shaped, when a response is cacheable, what a creation returns, and what happens when you call too often.

Each endpoint's own parameters and response shapes are in /reference. This page is the part that doesn't change from one endpoint to the next.

Quick Reference

Category Key Details
Base URL https://api.taigacloud.tech - Major version is first path segment (/v2/projects)
Request Format JSON in, JSON out. Send Content-Type: application/json on any request with a body
Authentication Authorization: Bearer <token> or session cookie
HTTP Methods GET (read), POST (create), PATCH (update), DELETE (remove). PUT is not used
Identifiers Resources are identified by UUID (stable) vs. names (changeable)
Rate Limits 60 second window. Per identity (tokens) or per IP (public endpoints)

Base URL

https://api.taigacloud.tech

The major version is the first path segment: /v2/projects, not /projects. See Versioning.

Requests

HTTP Methods

  • GET - Read data
  • POST - Create new resources
  • PATCH - Update existing resources
  • DELETE - Remove resources
  • PUT - Not used

Content Type

JSON in, JSON out. Send Content-Type: application/json on any request with a body.

Authentication

  • Authorization: Bearer <token>
  • Or session cookie in a browser — see Authentication

Identifiers

Resources are identified by UUID, and a UUID is stable for the life of the resource. Names aren't — they can be changed.

Some endpoints accept either form, and the parameter name says so:

Parameter Accepts
{uuid}, {projectUUID}, {clusterUUID} A UUID only.
{customerORprojectUUID} The UUID of either kind of object.
{usernameORuserUUID} A username or a UUID.

Timestamps

Times are ISO 8601 in UTC, and appear as created and last_updated.

created is not always a timestamp

On some resources — customers, projects, users, roles — created is a date only (2026-02-11), while on others — machines, devices — it's a full timestamp (2026-02-11T09:14:22.481000Z). last_updated is a timestamp throughout.

Parse created with something that accepts both, and check the field's format in /reference if you need the distinction.

Scope

Two levels of grouping decide what you can see and do.

Level Description
Customer The top-level organisation. Most resources belong to one.
Project Subdivides a customer, and owns the day-to-day resources — machines, networks, keys.

Roles are granted within a customer or a project rather than globally, so the same request returns different results to different callers. That's scope, not personalisation.

Access failures look like absence

A resource outside your scope is reported as though it doesn't exist, so its existence is never disclosed. A 404 on an identifier you believe is valid is more often a scope question than a wrong id.

The resource model covers what belongs to what.

Collections

There are two list shapes, not one

Most list endpoints return a paged envelope. Several return a plain JSON array instead, with no count or next — even where they accept limit and offset.

Shape Endpoints
Paged envelope Customers, projects, users, registered devices
Plain array Machines in a project, networks, IPv4 addresses, SSH keys, and the /v2/info catalogues

Check the response shape in /reference for the endpoint you're calling rather than assuming either one. A generated client will reflect the difference faithfully, which surprises people who expected uniformity.

The paged envelope

Where an endpoint pages, the envelope is always this:

{
  "count": 42,
  "limit": 20,
  "offset": 0,
  "next": "/v2/projects?offset=20&limit=20",
  "previous": null,
  "results": []
}

next and previous are null at the ends of the collection. Follow next rather than incrementing offset yourself, so your paging stays correct if the defaults change.

Query parameters

These are shared, and appear on array-returning list endpoints too:

Parameter Notes
limit Page size. Capped per endpoint — often at 100.
offset Items to skip.
sort_by Field to sort on. The permitted fields vary by endpoint, and some accept exactly one.
order asc or desc.
search Free-text filter, where the endpoint supports one.

count is the size of the whole collection — except when search is applied, where it describes the filtered page.

An empty collection is not always an empty response

This is the one place the API is genuinely inconsistent, and it's worth knowing before it bites:

Resource Type Empty Response
SSH keys, networks, IPv4 addresses, machines An empty collection — []
Customers, projects 404, with detail reading No projects found

So GET /v2/projects returning 404 doesn't mean the endpoint is wrong or your token is bad — it can simply mean there are no projects you can see. Handle "nothing found" and "not found" the same way on those two endpoints rather than treating the 404 as an error.

Conditional requests

List and detail responses carry an ETag. Send it back and an unchanged resource answers 304 Not Modified with no body:

GET /v2/projects/{projectUUID}
If-None-Match: "a1b2c3"
curl -H "Authorization: Bearer $TOKEN" \
     -H 'If-None-Match: "a1b2c3"' \
     -o /dev/null -w '%{http_code}\n' \
     https://api.taigacloud.tech/v2/projects

Worth doing for anything polled — it saves the payload and the serialisation at both ends, and it doesn't count differently against your rate limit, so the saving is bandwidth rather than quota.

Treat the ETag as opaque: store the exact header value and send it back unmodified, quotes included. Which endpoints honour it is marked per operation in /reference — every one that does declares If-None-Match and a 304 response.

Creating a Resource

Creations answer with the resource, and with two headers that save you parsing the body for its identifier:

Header Meaning
Location Path of the new resource.
X-Resource-ID Its UUID.
curl -si -X POST https://api.taigacloud.tech/v2/network/networks/$CLUSTER/$PROJECT \
  -H "Authorization: Bearer $TOKEN" | grep -i x-resource-id

Asynchronous Operations

Some work takes longer than a request should stay open. Where that's true the response describes the resource you asked for, not one you can use yet.

Machine creation lets you choose. Send queued in the body of POST /v2/vm/vms:

queued Response Meaning
true 202 Accepted Returns as soon as the request is recorded.
false or omitted 200 OK Waits until provisioning has been dispatched.

Neither mode waits for the machine to be usable — provisioning finishes in the background either way. Poll GET /v2/vms/vm/{uuid} and watch status until the machine reports itself active. A few seconds between polls is plenty, and an ETag makes the polling cheap.

Network creation is the same shape. POST /v2/network/networks/{clusterUUID}/{projectUUID} reserves the prefix immediately and brings the network up afterwards, so it returns before the network is active. Poll GET /v2/network/network/{uuid} until it is before creating machines on it.

Power state changes are asynchronous too. A *_REQUESTED status on POST /v2/vm/vm/{uuid}/status is carried out by the provisioning system, so the machine in the response still carries the *_requested status. Poll to see it settle.

Everything else has finished by the time it answers.

Transitional states reject operations

A resource part-way through provisioning or teardown answers 428 or 406 rather than queuing the request behind the work in flight. Waiting for active isn't politeness, it's the contract.

Console Access

GET /v2/vm/vm/{uuid}/console doesn't open a console. It returns a wss:// URL carrying a short-lived token, which you then connect to with a SPICE-capable WebSocket client.

The machine must be active; in any other state the request answers 406 rather than handing back a URL that couldn't connect. The URL embeds a credential — treat it as a secret and do not log it or share it.

The WebSocket endpoint itself isn't listed among the operations in /reference, because WebSocket upgrades cannot be described in OpenAPI. Use the URL exactly as returned, including its query string.

Rate Limits

Every limit is counted over a 60 second window. Endpoints you call with a token are counted per identity, so one token's traffic cannot exhaust another's. Public endpoints — login, the device flow, and the legacy v1 surface — are counted per IP instead.

Area Requests / minute
Device authorisation (/oauth2/device/code, /verify), registered devices 5
Login, logout, token exchange, session invalidation 10
Device token polling (/oauth2/device/token) 30
Customers, projects, users, networks, SSH keys, machines 200
Your own user record (/v2/users/users/user) 300
Catalogue endpoints (/v2/info) and the legacy v1 surface 500

Limits are counted per method as well as per area, so reads and writes to the same resource don't share a budget.

Every rate-limited response — not only a 429 — carries headers describing the window, so you can watch your own headroom rather than waiting to be refused:

Header Meaning Sent on
X-RateLimit-Limit Requests permitted in the window. Every response
X-RateLimit-Remaining Requests left. Every response
X-RateLimit-Reset Seconds until the window resets. Every response
Retry-After Seconds to wait before retrying. 429 only

Wait for Retry-After rather than retrying straight away — a tight retry loop simply keeps the limit tripped.

The device flow is the limit you'll meet first

Device authorisation allows 5 requests a minute and token polling 30. Poll at the interval the device authorisation response gives you, not faster.

Errors

Failures return a JSON body with a detail field — either a string, or an object carrying the status code and a message:

{"detail": "Not authenticated"}
{"detail": {"code": 404, "detail": "No projects found"}}

Treat the HTTP status code as authoritative and detail as human-readable. Its wording is not part of the contract, so do not parse it to decide control flow.

Status Meaning Typical cause
400 Bad Request Malformed body, or a field that failed validation
401 Unauthorised Missing, expired or malformed bearer token
403 Forbidden Authenticated, but your role does not permit the action
404 Not Found The resource does not exist, or is outside your scope
406 Not Acceptable The resource is not in a state that allows the operation
412 Precondition Failed A requirement was not met — a resource still in use, or no capacity left
422 Unprocessable Entity The body did not match the schema
428 Precondition Required Something must happen first — see below
429 Too Many Requests Rate limit exceeded — wait for Retry-After
500 Internal Server Error Unexpected fault; safe to retry once
503 Service Unavailable A dependency is busy or unavailable; retry with backoff

The Four Most Commonly Misunderstood Errors

  • 403 won't be fixed by a new token. It means your role doesn't cover the action, and access has to be granted on the customer or project — see Managing access.
  • 404 is often a scope question. Resources outside your scope answer 404 rather than 403, so their existence isn't disclosed.
  • 412 and 428 are about the state of things, not your request. 412 means a precondition failed — a resource still in use, or a cluster with no capacity left. 428 means something must happen first.
  • 428 while polling the device flow is normal. It means the sign-in hasn't been approved yet, so keep polling rather than treating it as a failure.

Retry Strategy

There are no idempotency keys. A POST that timed out may well have succeeded, so retrying it can create a second resource — list the collection and check before sending it again. Reads and deletes are safe to repeat.

500 is worth one retry. 503 deserves backoff. 412 on a capacity failure isn't a transient error and will keep failing until capacity exists, so do not retry it in a loop.

Best Practices

  • Ignore unknown response fields. New ones can appear within a major version; a client that rejects them will break on an additive change.
  • Follow the next link when paging rather than incrementing offset.
  • Branch on status codes, not on detail strings.
  • Treat tokens and console URLs as opaque secrets.