Documentation

GetCurrentGames

Get details about all current running game servers matching the given parameters.

Request Details

CurrentGamesRequest
Request Properties
BuildVersion String

Build to match against.

GameMode String

Game mode to look for.

Region Region

Region to check for Game Server Instances.

StatisticName String

Statistic name to find statistic-based matches.

TagFilter CollectionFilter

Filter to include and/or exclude Game Server Instances associated with certain tags.

POST https://{{TitleID}}.playfabapi.com/Client/GetCurrentGames
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "Region": "USCentral",
  "BuildVersion": "5.0.1",
  "GameMode": "CaptureTheFlag",
  "StatisticName": "level",
  "TagFilter": {
    "Includes": [
      {
        "Data": {
          "level_cap": "0"
        }
      }
    ],
    "Excludes": [
      {
        "Data": {
          "newbie": "0"
        }
      }
    ]
  }
}
        

Response Details

CurrentGamesResult
Result Properties
GameCount (required) int32

number of games running

Games List<GameInfo>

array of games found

PlayerCount (required) int32

total number of players across all servers

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "Games": [
      {
        "Region": "USCentral",
        "LobbyID": "Lobby 32",
        "BuildVersion": "5.01",
        "GameMode": "0",
        "MaxPlayers": 26,
        "PlayerUserIds": [
          "70CE3CC42DD4D363",
          "17978105374C103C"
        ],
        "RunTime": 400,
        "GameServerState": 0,
        "GameServerData": "\"ValueA\":\"FFA\",\"ValueB\":\"BBE\""
      }
    ],
    "PlayerCount": 95,
    "GameCount": 19
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code