Circuit API › Tiers
GET /tiers
Returns all tiers from your circuits.
Resource URL
https://api.toornament.com/circuit/v2/tiers
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
tiers
unit. The size of the range can not exceed 50. (see Pagination)Example: tiers=0-49
Query Parameters
- tier_idsarray
Only return circuits for the given list of ids.
Example: 5617559294676615168,5629045554450325504
- tier_machine_namesarray
One or several machine name of tiers to filter.
Example: tier_1,tier_2
- 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] Tiers retrieved.
Example
[ { "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Tier 1", "machine_name": "tier1", "order": 0 } ]
Structure (collection)
- idstring
The unique identifier of the tier.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this tier.
Example: "5629045554450325504"
- namestring
The name of the tier.
Max. length: 40 characters
Example: "Tier 1"
- machine_namestring
A name used to identify a tier for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the tiers are displayed.
Example: 0
POST /tiers
Creates a new tier in the identified circuit.
Resource URL
https://api.toornament.com/circuit/v2/tiers
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
Tier data
Example
{ "circuit_id": "5629045554450325504", "name": "Tier 1", "machine_name": "tier1", "order": 0 }
Structure (object)
- circuit_idstring
The id of the circuit that contains this tier.
Example: "5629045554450325504"
- namestring
The name of the tier.
Max. length: 40 characters
Example: "Tier 1"
- machine_namestring
A name used to identify a tier for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Optional
Number used to determine the order in which the tiers are displayed.
Example: 0
Response
[201] Tier created.
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Tier 1", "machine_name": "tier1", "order": 0 }
Structure (object)
- idstring
The unique identifier of the tier.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this tier.
Example: "5629045554450325504"
- namestring
The name of the tier.
Max. length: 40 characters
Example: "Tier 1"
- machine_namestring
A name used to identify a tier for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the tiers are displayed.
Example: 0
GET /tiers/{id}
Returns a tier identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/tiers/{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 tier.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Tier retrieved
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Tier 1", "machine_name": "tier1", "order": 0 }
Structure (object)
- idstring
The unique identifier of the tier.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this tier.
Example: "5629045554450325504"
- namestring
The name of the tier.
Max. length: 40 characters
Example: "Tier 1"
- machine_namestring
A name used to identify a tier for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the tiers are displayed.
Example: 0
PATCH /tiers/{id}
Updates a tier identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/tiers/{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 tier.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Tier data.
Example
{ "name": "Tier 1", "order": 0 }
Structure (object)
- namestring
Optional
The name of the tier.
Max. length: 40 characters
Example: "Tier 1"
- orderinteger
Optional
Number used to determine the order in which the tiers are displayed.
Example: 0
Response
[200] Tier update.
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Tier 1", "machine_name": "tier1", "order": 0 }
Structure (object)
- idstring
The unique identifier of the tier.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this tier.
Example: "5629045554450325504"
- namestring
The name of the tier.
Max. length: 40 characters
Example: "Tier 1"
- machine_namestring
A name used to identify a tier for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "tier1"
- orderinteger
Number used to determine the order in which the tiers are displayed.
Example: 0
DELETE /tiers/{id}
Deletes a tier identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/tiers/{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 tier.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.