API

Location

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/hosting/locations list Available hosting locations

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

locations, err := client.Location(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(locations)

Lua

Construct client as shown in the Lua setup, then call the operations:

local locations, err = client:Location():list()

PHP

Construct client as shown in the PHP setup, then call the operations:

$locations = $client->Location()->list();

Python

Construct client as shown in the Python setup, then call the operations:

locations = client.Location().list()

Ruby

Construct client as shown in the Ruby setup, then call the operations:

locations = client.Location.list()

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const locations = await client.Location().list()

Fields

Field Type Required Description
code string Yes Code
created_at string Yes Created At
id string Yes Id
name string Yes Name
nomad_datacenter string Yes Nomad Datacenter
updated_at string Yes Updated At

list

GET /api/v1/hosting/locations

Operation ID: api_v1_locations.

Authentication: bearer token (bearerAuth).

Responses

200: Available hosting locations

application/json

Property Type Required Description
locations array of object Yes
locations[].code string Yes
locations[].created_at string (date-time) Yes
locations[].id string Yes
locations[].name string Yes
locations[].nomad_datacenter string Yes
locations[].updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway