Circuit API › Regions

GET /regions

Returns all regions from your circuits.

Resource URL

https://api.toornament.com/circuit/v2/regions

HTTP headers

  • X-Api-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with organizer:circuit scope (see Authorization)

  • Range
    string

    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_ids
    array

    Only return regions for the given list of ids.

    Example: 5617559294676615168,5629045554450325504

  • region_machine_names
    array

    One or several machine name of regions to filter.

    Example: europe,americas,asia

  • circuit_ids
    array

    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)
  • id
    string

    The unique identifier of the region.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this region.

    Example: "5629045554450325504"

  • name
    string

    The name of the region.

    Max. length: 40 characters

    Example: "Europe West"

  • machine_name
    string

    A name used to identify a region for computing purposes.

    Pattern: ^[a-z0-9_]+$

    Max. length: 40 characters

    Example: "tier1"

  • order
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    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_id
    string

    The id of the circuit that contains this region.

    Example: "5629045554450325504"

  • name
    string

    The name of the region.

    Max. length: 40 characters

    Example: "Europe West"

  • machine_name
    string

    A name used to identify a region for computing purposes.

    Pattern: ^[a-z0-9_]+$

    Max. length: 40 characters

    Example: "tier1"

  • order
    integer

    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)
  • id
    string

    The unique identifier of the region.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this region.

    Example: "5629045554450325504"

  • name
    string

    The name of the region.

    Max. length: 40 characters

    Example: "Europe West"

  • machine_name
    string

    A name used to identify a region for computing purposes.

    Pattern: ^[a-z0-9_]+$

    Max. length: 40 characters

    Example: "tier1"

  • order
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with organizer:circuit scope (see Authorization)

Path parameters

  • id
    string

    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)
  • id
    string

    The unique identifier of the region.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this region.

    Example: "5629045554450325504"

  • name
    string

    The name of the region.

    Max. length: 40 characters

    Example: "Europe West"

  • machine_name
    string

    A name used to identify a region for computing purposes.

    Pattern: ^[a-z0-9_]+$

    Max. length: 40 characters

    Example: "tier1"

  • order
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with organizer:circuit scope (see Authorization)

Path parameters

  • id
    string

    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)
  • name
    string

    Optional

    The name of the region.

    Max. length: 40 characters

    Example: "Europe West"

  • order
    integer

    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)
  • id
    string

    The unique identifier of the region.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this region.

    Example: "5629045554450325504"

  • name
    string

    The name of the region.

    Max. length: 40 characters

    Example: "Europe West"

  • machine_name
    string

    A name used to identify a region for computing purposes.

    Pattern: ^[a-z0-9_]+$

    Max. length: 40 characters

    Example: "tier1"

  • order
    integer

    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-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token with organizer:circuit scope (see Authorization)

Path parameters

  • id
    string

    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

[204] Success