Skip to content

Matches

GET https://api.xerberusapp.com/matches/

Optional parameters

ended: string.

Any value, preferably boolean, will be interpeted as a call to return only matches that have ended and\or are still ongoing.

limit: integer

Limits the number of matches returned from resource.

  • Min: 1
  • Max: 100
  • Default: 20

Required headers

Authorization: Bearer <access_token>

Description

An endpoint to request upcoming, or past, matches for all sites included in the client credentials. All matches contain additional data including contestant, group or bracket and tournament information.

Matches that do not have a start time set will not be returned.

Example requests

CURL:

curl -X GET https://api.xerberusapp.com/matches?limit=10 -H 'Authorization: Bearer {access_token}'

PHP:

<?php
$curl = curl_init();

$access_token = "2f563a4909b0f2d28de9d454030b0b6f48bf321b";

curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => "https://api.xerberusapp.com/matches?limit=10",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer {$access_token}"
    ]
]);

# Contains your access token data
$response = json_decode(curl_exec($curl));
curl_close($curl);

Example responses

Success:

{
   "object":"matches",
   "data":[
      {
         "id":"1260",
         "group_id":null,
         "bracket_id":"108",
         "locked":"0",
         "row":"1",
         "stage":"1",
         "round_of":"4",
         "start":"2018-10-23 10:00:00",
         "best_of":"3",
         "bye":"0",
         "conflict":"0",
         "site":"demo.xerberusapp.com",
         "contestants":[
            {
               "score":"0",
               "sort":"1",
               "kills":"0",
               "deaths":null,
               "time":null,
               "deduction":"0",
               "name":"ENCE",
               "country":"fi",
               "seed":"1"
            },
            {
               "score":"0",
               "sort":"2",
               "kills":"0",
               "deaths":null,
               "time":null,
               "deduction":"0",
               "name":"SuperJymy",
               "country":"fi",
               "seed":"2"
            }
         ],
         "tournament":{
            "game":"Counter-Strike: Global Offensive",
            "game_slug":"counter-strike-global-offensive",
            "title":"eSM 2018 CS:GO 1. osakilpailu",
            "slug":"esm-2018-csgo-1-osakilpailu",
            "start":"2018-10-22 13:00:00",
            "end":"2018-10-24 23:00:00"
         },
         "bracket":{
            "title":"Playoffs",
            "type":"single",
            "size":"4",
            "related_bracket_id":null,
            "best_of_params":{
               "ro2gf":"",
               "ro2":"5",
               "bronze":"1",
               "ro4":"3",
               "ro8":"3",
               "ro16":"3",
               "ro32":"3",
               "ro64":"3",
               "ro128":"3",
               "lower":{
                  "ro2s2":"1",
                  "ro2s1":"1",
                  "ro4s2":"1",
                  "ro4s1":"1",
                  "ro8s2":"1",
                  "ro8s1":"1",
                  "ro16s2":"1",
                  "ro16s1":"1",
                  "ro32s2":"1",
                  "ro32s1":"1",
                  "ro64s2":"1",
                  "ro64s1":"1"
               }
            }
         }
      },
      {
         "id":"1261",
         "group_id":null,
         "bracket_id":"108",
         "locked":"0",
         "row":"2",
         "stage":"1",
         "round_of":"4",
         "start":"2018-10-23 10:00:00",
         "best_of":"3",
         "bye":"0",
         "conflict":"0",
         "site":"demo.xerberusapp.com",
         "contestants":[
            {
               "score":"0",
               "sort":"1",
               "kills":"0",
               "deaths":null,
               "time":null,
               "deduction":"0",
               "name":"minttu",
               "country":"fi",
               "seed":"3"
            },
            {
               "score":"0",
               "sort":"2",
               "kills":"0",
               "deaths":null,
               "time":null,
               "deduction":"0",
               "name":"Conquer Gaming",
               "country":"fi",
               "seed":"4"
            }
         ],
         "tournament":{
            "game":"Counter-Strike: Global Offensive",
            "game_slug":"counter-strike-global-offensive",
            "title":"eSM 2018 CS:GO 1. osakilpailu",
            "slug":"esm-2018-csgo-1-osakilpailu",
            "start":"2018-10-22 13:00:00",
            "end":"2018-10-24 23:00:00"
         },
         "bracket":{
            "title":"Playoffs",
            "type":"single",
            "size":"4",
            "related_bracket_id":null,
            "best_of_params":{
               "ro2gf":"",
               "ro2":"5",
               "bronze":"1",
               "ro4":"3",
               "ro8":"3",
               "ro16":"3",
               "ro32":"3",
               "ro64":"3",
               "ro128":"3",
               "lower":{
                  "ro2s2":"1",
                  "ro2s1":"1",
                  "ro4s2":"1",
                  "ro4s1":"1",
                  "ro8s2":"1",
                  "ro8s1":"1",
                  "ro16s2":"1",
                  "ro16s1":"1",
                  "ro32s2":"1",
                  "ro32s1":"1",
                  "ro64s2":"1",
                  "ro64s1":"1"
               }
            }
         }
      },
      {
         "id":"1262",
         "group_id":null,
         "bracket_id":"108",
         "locked":"0",
         "row":"1",
         "stage":"1",
         "round_of":"2",
         "start":"2018-10-23 10:00:00",
         "best_of":"5",
         "bye":"0",
         "conflict":"0",
         "site":"demo.xerberusapp.com",
         "contestants":[

         ],
         "tournament":{
            "game":"Counter-Strike: Global Offensive",
            "game_slug":"counter-strike-global-offensive",
            "title":"eSM 2018 CS:GO 1. osakilpailu",
            "slug":"esm-2018-csgo-1-osakilpailu",
            "start":"2018-10-22 13:00:00",
            "end":"2018-10-24 23:00:00"
         },
         "bracket":{
            "title":"Playoffs",
            "type":"single",
            "size":"4",
            "related_bracket_id":null,
            "best_of_params":{
               "ro2gf":"",
               "ro2":"5",
               "bronze":"1",
               "ro4":"3",
               "ro8":"3",
               "ro16":"3",
               "ro32":"3",
               "ro64":"3",
               "ro128":"3",
               "lower":{
                  "ro2s2":"1",
                  "ro2s1":"1",
                  "ro4s2":"1",
                  "ro4s1":"1",
                  "ro8s2":"1",
                  "ro8s1":"1",
                  "ro16s2":"1",
                  "ro16s1":"1",
                  "ro32s2":"1",
                  "ro32s1":"1",
                  "ro64s2":"1",
                  "ro64s1":"1"
               }
            }
         }
      }
   ]
}

Expired token:

{
    "error": "invalid_token",
    "error_description": "The access token provided has expired"
}

Usage

To use your access token to gain access to resources, add it to your Authorization header.

curl -X GET https://api.xerberusapp.com/hello -H 'Authorization: Bearer 2f563a4909b0f2d28de9d454030b0b6f48bf321b'