Circuit API › Regions
GET /regions
Returns all regions from your circuits.
Resource URL
https://api.toornament.com/circuit/v2/regions
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:circuit
scope (see Authorization) - Rangestring
A range of requested items using the
regions
unit. The size of the range can not exceed 50. (see Pagination)Example: regions=0-49
Query Parameters
- region_idsarray
Only return regions for the given list of ids.
Example: 5617559294676615168,5629045554450325504
- region_machine_namesarray
One or several machine name of regions to filter.
Example: europe,americas,asia
- circuit_idsarray
Only return circuits for the given list of ids.
Example: 5617559294676615168,5629045554450325504
Request Body
This endpoint does not require a request body.
Response
[206] Regions retrieved.
Example
[ { "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Europe West", "machine_name": "tier1", "order": 0 } ]
Structure (collection)
- idstring
The unique identifier of the region.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this region.
Example: "5629045554450325504"
- namestring
The name of the region.
Max. length: 40 characters
Example: "Europe West"
- machine_namestring
A name used to identify a region for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the regions are displayed.
Example: 0
POST /regions
Creates a new region in the identified circuit.
Resource URL
https://api.toornament.com/circuit/v2/regions
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:circuit
scope (see Authorization)
Query Parameters
This endpoint does not have any query parameters.
Request Body
Region data
Example
{ "circuit_id": "5629045554450325504", "name": "Europe West", "machine_name": "tier1", "order": 0 }
Structure (object)
- circuit_idstring
The id of the circuit that contains this region.
Example: "5629045554450325504"
- namestring
The name of the region.
Max. length: 40 characters
Example: "Europe West"
- machine_namestring
A name used to identify a region for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Optional
Number used to determine the order in which the regions are displayed.
Example: 0
Response
[201] Region created.
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Europe West", "machine_name": "tier1", "order": 0 }
Structure (object)
- idstring
The unique identifier of the region.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this region.
Example: "5629045554450325504"
- namestring
The name of the region.
Max. length: 40 characters
Example: "Europe West"
- machine_namestring
A name used to identify a region for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the regions are displayed.
Example: 0
GET /regions/{id}
Returns a region identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/regions/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:circuit
scope (see Authorization)
Path parameters
- idstring
The id of the region.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Region retrieved
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Europe West", "machine_name": "tier1", "order": 0 }
Structure (object)
- idstring
The unique identifier of the region.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this region.
Example: "5629045554450325504"
- namestring
The name of the region.
Max. length: 40 characters
Example: "Europe West"
- machine_namestring
A name used to identify a region for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the regions are displayed.
Example: 0
PATCH /regions/{id}
Updates a region identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/regions/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:circuit
scope (see Authorization)
Path parameters
- idstring
The id of the region.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Region data.
Example
{ "name": "Europe West", "order": 0 }
Structure (object)
- namestring
Optional
The name of the region.
Max. length: 40 characters
Example: "Europe West"
- orderinteger
Optional
Number used to determine the order in which the regions are displayed.
Example: 0
Response
[200] Region update.
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Europe West", "machine_name": "tier1", "order": 0 }
Structure (object)
- idstring
The unique identifier of the region.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this region.
Example: "5629045554450325504"
- namestring
The name of the region.
Max. length: 40 characters
Example: "Europe West"
- machine_namestring
A name used to identify a region for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the regions are displayed.
Example: 0
DELETE /regions/{id}
Deletes a region identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/regions/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:circuit
scope (see Authorization)
Path parameters
- idstring
The id of the region.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.