Circuit API › Seasons
GET /seasons
Returns all seasons from your circuits.
Resource URL
https://api.toornament.com/circuit/v2/seasons
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
seasons
unit. The size of the range can not exceed 50. (see Pagination)Example: seasons=0-49
Query Parameters
- circuit_idsarray
Only return circuits for the given list of ids.
Example: 5617559294676615168,5629045554450325504
- season_idsarray
Only return seasons for the given list of ids.
Example: 5617559294676615168,5629045554450325504
- season_machine_namesarray
One or several machine name of seasons to filter.
Example: season_1,season_3
- season_beforestring
An ISO 8601 date (only the date part, with YYYY-MM-DD pattern) to include all seasons scheduled to take place before or at the date.
Format: date
- season_afterstring
An ISO 8601 date (only the date part, with YYYY-MM-DD pattern) to include all seasons scheduled to take place after or at the date.
Format: date
Request Body
This endpoint does not require a request body.
Response
[206] Seasons retrieved.
Example
[ { "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Open Winter 2022", "date_start": "2022-01-03", "date_end": "2022-04-08", "machine_name": "open_winter_2022" } ]
Structure (collection)
- idstring
The unique identifier of the season.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this season.
Example: "5629045554450325504"
- namestring
The name of the season.
Max. length: 40 characters
Example: "Open Winter 2022"
- date_startstring|null
A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-01-03"
- date_endstring|null
An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-04-08"
- machine_namestring
A name used to identify a season for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "open_winter_2022"
POST /seasons
Creates a new season in the identified circuit.
Resource URL
https://api.toornament.com/circuit/v2/seasons
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
Season data
Example
{ "circuit_id": "5629045554450325504", "name": "Open Winter 2022", "date_start": "2022-01-03", "date_end": "2022-04-08", "machine_name": "open_winter_2022" }
Structure (object)
- circuit_idstring
The id of the circuit that contains this season.
Example: "5629045554450325504"
- namestring
The name of the season.
Max. length: 40 characters
Example: "Open Winter 2022"
- date_startstring|null
A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-01-03"
- date_endstring|null
An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-04-08"
- machine_namestring
A name used to identify a season for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "open_winter_2022"
Response
[201] Season created.
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Open Winter 2022", "date_start": "2022-01-03", "date_end": "2022-04-08", "machine_name": "open_winter_2022" }
Structure (object)
- idstring
The unique identifier of the season.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this season.
Example: "5629045554450325504"
- namestring
The name of the season.
Max. length: 40 characters
Example: "Open Winter 2022"
- date_startstring|null
A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-01-03"
- date_endstring|null
An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-04-08"
- machine_namestring
A name used to identify a season for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "open_winter_2022"
GET /seasons/{id}
Returns a season identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/seasons/{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 season.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Season retrieved
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Open Winter 2022", "date_start": "2022-01-03", "date_end": "2022-04-08", "machine_name": "open_winter_2022" }
Structure (object)
- idstring
The unique identifier of the season.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this season.
Example: "5629045554450325504"
- namestring
The name of the season.
Max. length: 40 characters
Example: "Open Winter 2022"
- date_startstring|null
A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-01-03"
- date_endstring|null
An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-04-08"
- machine_namestring
A name used to identify a season for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "open_winter_2022"
PATCH /seasons/{id}
Updates a season identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/seasons/{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 season.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Season data.
Example
{ "name": "Open Winter 2022", "date_start": "2022-01-03", "date_end": "2022-04-08" }
Structure (object)
- namestring
Optional
The name of the season.
Max. length: 40 characters
Example: "Open Winter 2022"
- date_startstring|null
Optional
A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-01-03"
- date_endstring|null
Optional
An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-04-08"
Response
[200] Season update.
Example
{ "id": "5629088936350867456", "circuit_id": "5629045554450325504", "name": "Open Winter 2022", "date_start": "2022-01-03", "date_end": "2022-04-08", "machine_name": "open_winter_2022" }
Structure (object)
- idstring
The unique identifier of the season.
Example: "5629088936350867456"
- circuit_idstring
The id of the circuit that contains this season.
Example: "5629045554450325504"
- namestring
The name of the season.
Max. length: 40 characters
Example: "Open Winter 2022"
- date_startstring|null
A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-01-03"
- date_endstring|null
An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).
Format: date
Example: "2022-04-08"
- machine_namestring
A name used to identify a season for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 40 characters
Example: "open_winter_2022"
DELETE /seasons/{id}
Deletes a season identified by the given id.
Resource URL
https://api.toornament.com/circuit/v2/seasons/{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 season.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.