Docs
Sizes and regions ›

List regions

GET/v1/regions

The regions sandboxes can be made in, and the sizes each has room for now.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const regions = await agental.regions();
Answer200 OK · RegionList
  1. {
  2. "regions": [{
  3. "name": string,
  4. "label": string,
  5. "about": string,
  6. "default": boolean,
  7. "sizesWithRoom": string[],
  8. }],
  9. }

The regions sandboxes can be made in now: those with servers, the default first, each with the sizes it has room for now.

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 The regions sandboxes can be made in now: those with servers, the default first, each with the sizes it has room for now. A region with no servers is not listed.

RegionList1 field
regions
Region[]5 fields
name
string
label
string
What it is called in words.
about
string
Where its servers are.
default
boolean
True for the region a create that names none is made in.
sizesWithRoom
string[]
The sizes a new sandbox could be made at in it now.
More It can change by the second: a create is still refused with 409 capacity_exceeded when it fills meanwhile.

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.