Circuit API › Seasons

GET /seasons

Returns all seasons from your circuits.

Resource URL

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

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 seasons unit. The size of the range can not exceed 50. (see Pagination)

    Example: seasons=0-49

Query Parameters

  • circuit_ids
    array

    Only return circuits for the given list of ids.

    Example: 5617559294676615168,5629045554450325504

  • season_ids
    array

    Only return seasons for the given list of ids.

    Example: 5617559294676615168,5629045554450325504

  • season_machine_names
    array

    One or several machine name of seasons to filter.

    Example: season_1,season_3

  • season_before
    string

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

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

    The unique identifier of the season.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this season.

    Example: "5629045554450325504"

  • name
    string

    The name of the season.

    Max. length: 40 characters

    Example: "Open Winter 2022"

  • date_start
    string|null

    A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-01-03"

  • date_end
    string|null

    An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-04-08"

  • machine_name
    string

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

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

    The id of the circuit that contains this season.

    Example: "5629045554450325504"

  • name
    string

    The name of the season.

    Max. length: 40 characters

    Example: "Open Winter 2022"

  • date_start
    string|null

    A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-01-03"

  • date_end
    string|null

    An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-04-08"

  • machine_name
    string

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

    The unique identifier of the season.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this season.

    Example: "5629045554450325504"

  • name
    string

    The name of the season.

    Max. length: 40 characters

    Example: "Open Winter 2022"

  • date_start
    string|null

    A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-01-03"

  • date_end
    string|null

    An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-04-08"

  • machine_name
    string

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

    The unique identifier of the season.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this season.

    Example: "5629045554450325504"

  • name
    string

    The name of the season.

    Max. length: 40 characters

    Example: "Open Winter 2022"

  • date_start
    string|null

    A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-01-03"

  • date_end
    string|null

    An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-04-08"

  • machine_name
    string

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

    Optional

    The name of the season.

    Max. length: 40 characters

    Example: "Open Winter 2022"

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

    The unique identifier of the season.

    Example: "5629088936350867456"

  • circuit_id
    string

    The id of the circuit that contains this season.

    Example: "5629045554450325504"

  • name
    string

    The name of the season.

    Max. length: 40 characters

    Example: "Open Winter 2022"

  • date_start
    string|null

    A starting date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-01-03"

  • date_end
    string|null

    An ending date in ISO 8601 format (only the date part, with YYYY-MM-DD pattern).

    Format: date

    Example: "2022-04-08"

  • machine_name
    string

    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-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 season.

Query Parameters

This endpoint does not have any query parameters.

Request Body

This endpoint does not require a request body.

Response

[204] Success