Circuit API › Seasons

GET /seasons

Retrieves the seasons of all 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 circuits for the given list of ids.

    Example: 5617559294676615168,5629045554450325504

  • season_before
    string

    An ISO 8601 date (only the date part, with YYYY-MM-DD pattern) to include all tournaments 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 tournaments 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
[
    {
        "name": "Open Winter 2022",
        "date_start": "2022-01-03",
        "date_end": "2022-04-08",
        "machine_name": "open_winter_2022",
        "id": "5629088936350867456"
    }
]
Structure (collection)
  • 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"

  • id
    string

    The unique identifier of the season.

    Example: "5629088936350867456"

POST /seasons

Creates a new season.

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
{
    "name": "Open Winter 2022",
    "date_start": "2022-01-03",
    "date_end": "2022-04-08",
    "machine_name": "open_winter_2022"
}
Structure (object)
  • 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] Circuit created.

Example
{
    "name": "Open Winter 2022",
    "date_start": "2022-01-03",
    "date_end": "2022-04-08",
    "machine_name": "open_winter_2022",
    "id": "5629088936350867456"
}
Structure (object)
  • 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"

  • id
    string

    The unique identifier of the season.

    Example: "5629088936350867456"

GET /seasons/{id}

Retrieves 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
{
    "name": "Open Winter 2022",
    "date_start": "2022-01-03",
    "date_end": "2022-04-08",
    "machine_name": "open_winter_2022",
    "id": "5629088936350867456"
}
Structure (object)
  • 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"

  • id
    string

    The unique identifier of the season.

    Example: "5629088936350867456"

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
{
    "name": "Open Winter 2022",
    "date_start": "2022-01-03",
    "date_end": "2022-04-08",
    "machine_name": "open_winter_2022",
    "id": "5629088936350867456"
}
Structure (object)
  • 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"

  • id
    string

    The unique identifier of the season.

    Example: "5629088936350867456"

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