Games

GET /tournaments/{tournament_id}/matches/{match_id}/games

Returns a collection of games from one match.

Resource URL

https://api.toornament.com/v1/tournaments/{tournament_id}/matches/{match_id}/games

Path parameters

  • tournament_id
    string

    The id of the match's tournament.

  • match_id
    string

    The id of the game's match.

Query Parameters

  • with_stats
    boolean

    When set to '1', it will include a summary of stats of the game.

    Allowed values: 1, 0

    Default: 1

Request Body

This endpoint doesn't require a request body.

Response

[200] Success

Example
[
    {
        "number": 1,
        "status": "completed",
        "opponents": [
            {
                "number": 1,
                "participant": {
                    "id": "378426939508809728",
                    "name": "Evil Geniuses",
                    "country": "US"
                },
                "result": 1,
                "score": null,
                "forfeit": false
            }
        ]
    }
]
Structure (collection)
  • number
    integer

    Game's number.

    Example: 1

  • status
    string

    Game's status: "pending" means it hasn’t started yet; "running" means it has started but not ended yet; "completed" indicates the game is finished.

    Possible values: pending, running, completed

  • opponents
    array[object]

GET /tournaments/{tournament_id}/matches/{match_id}/games/{number}

Returns detailed information about one game.

Resource URL

https://api.toornament.com/v1/tournaments/{tournament_id}/matches/{match_id}/games/{number}

Path parameters

  • tournament_id
    string

    The id of the match's tournament.

  • match_id
    string

    The id of the game's match.

  • number
    integer

    The game number of the match

Query Parameters

  • with_stats
    boolean

    When set to '1', it will include a summary of stats of the game.

    Allowed values: 1, 0

    Default: 1

Request Body

This endpoint doesn't require a request body.

Response

[200] Success

Example
{
    "number": 1,
    "status": "completed",
    "opponents": [
        {
            "number": 1,
            "participant": {
                "id": "378426939508809728",
                "name": "Evil Geniuses",
                "country": "US"
            },
            "result": 1,
            "score": null,
            "forfeit": false
        }
    ]
}
Structure (object)
  • number
    integer

    Game's number.

    Example: 1

  • status
    string

    Game's status: "pending" means it hasn’t started yet; "running" means it has started but not ended yet; "completed" indicates the game is finished.

    Possible values: pending, running, completed

  • opponents
    array[object]

PATCH /tournaments/{tournament_id}/matches/{match_id}/games/{number}

Authorized Access

If you need to make changes on your game data, you are able to do so by patching one or several fields of your game.

Warning! This endpoint can only be used with an Authorized Access.

Resource URL

https://api.toornament.com/v1/tournaments/{tournament_id}/matches/{match_id}/games/{number}

Path parameters

  • tournament_id
    string

    The id of the match's tournament.

  • match_id
    string

    The id of the game's match.

  • number
    integer

    The game number of the match

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

Game data

Example
Structure (object)

Response

[200] Success

Example
{
    "number": 1,
    "status": "completed",
    "opponents": [
        {
            "number": 1,
            "participant": {
                "id": "378426939508809728",
                "name": "Evil Geniuses",
                "country": "US"
            },
            "result": 1,
            "score": null,
            "forfeit": false
        }
    ]
}
Structure (object)
  • number
    integer

    Game's number.

    Example: 1

  • status
    string

    Game's status: "pending" means it hasn’t started yet; "running" means it has started but not ended yet; "completed" indicates the game is finished.

    Possible values: pending, running, completed

  • opponents
    array[object]

GET /tournaments/{tournament_id}/matches/{match_id}/games/{number}/result

Returns detailed result about one specific game.

Resource URL

https://api.toornament.com/v1/tournaments/{tournament_id}/matches/{match_id}/games/{number}/result

Path parameters

  • tournament_id
    string

    The id of the match's tournament.

  • match_id
    string

    The id of the game's match.

  • number
    integer

    The game number of the match.

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't require a request body.

Response

[200] Success

Example
{
    "status": "completed",
    "opponents": [
        {
            "number": 1,
            "result": 1,
            "score": null,
            "forfeit": false
        }
    ]
}
Structure (object)
  • status
    string

    Game's status: "pending" means it hasn’t started yet; "running" means it has started but not ended yet; "completed" indicates the game is finished.

    Possible values: pending, running, completed

  • opponents
    array[object]

PUT /tournaments/{tournament_id}/matches/{match_id}/games/{number}/result

Authorized Access

Updates or creates detailed result about one game.

Warning! This endpoint can only be used with an Authorized Access.
To avoid mistakes for this endpoint, select your discipline.

Resource URL

https://api.toornament.com/v1/tournaments/{tournament_id}/matches/{match_id}/games/{number}/result

Path parameters

  • tournament_id
    string

    The id of the match's tournament.

  • match_id
    string

    The id of the game's match.

  • number
    integer

    The game number of the match.

Query Parameters

  • update_match
    boolean

    When set to "1", also updates result match of this game. When set to '0', updates only game result.

    Allowed values: 0, 1

    Default: 1

Request Body

Update or create

Example
{
    "status": "completed",
    "opponents": [
        {
            "number": 1,
            "result": 1,
            "score": null,
            "forfeit": false
        }
    ]
}
Structure (object)
  • status
    string

    Game's status: "pending" means it hasn’t started yet; "running" means it has started but not ended yet; "completed" indicates the game is finished.

    Possible values: pending, running, completed

  • opponents
    array[object]

Response

[200] Success

Example
{
    "status": "completed",
    "opponents": [
        {
            "number": 1,
            "result": 1,
            "score": null,
            "forfeit": false
        }
    ]
}
Structure (object)
  • status
    string

    Game's status: "pending" means it hasn’t started yet; "running" means it has started but not ended yet; "completed" indicates the game is finished.

    Possible values: pending, running, completed

  • opponents
    array[object]