Documentation

GetPlayerStatisticDefinitions

Retrieves the configuration information for all player statistics defined in the title, regardless of whether they have a reset interval.

Request Details

GetPlayerStatisticDefinitionsRequest
Request Properties
POST https://{{TitleID}}.playfabapi.com/Admin/GetPlayerStatisticDefinitions
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{}
        

Response Details

Statistics are numeric values, with each statistic in the title also generating a leaderboard. The ResetInterval defines the period of time at which the leaderboard for the statistic will automatically reset. Upon reset, the statistic updates to a new version with no values (effectively removing all players from the leaderboard). The previous version's statistic values are also archived for retrieval, if needed (see GetPlayerStatisticVersions). Statistics not created via a call to CreatePlayerStatisticDefinition by default have a VersionChangeInterval of Never, meaning they do not reset on a schedule, but they can be set to do so via a call to UpdatePlayerStatisticDefinition. Once a statistic has been reset (sometimes referred to as versioned or incremented), the previous version can still be written to for up a short, pre-defined period (currently 10 seconds), to prevent issues with levels completing around the time of the reset. Also, once reset, the historical statistics for players in the title may be retrieved using the URL specified in the version information (GetPlayerStatisticVersions). The AggregationMethod defines what action is taken when a new statistic value is submitted - always update with the new value (Last), use the highest of the old and new values (Max), use the smallest (Min), or add them together (Sum).

GetPlayerStatisticDefinitionsResult
Result Properties
Statistics List<PlayerStatisticDefinition>

the player statistic definitions for the title

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "Statistics": [
      {
        "StatisticName": "headshots",
        "CurrentVersion": 2,
        "DeletionInProgress": false,
        "VersionChangeInterval": "Day",
        "AggregationMethod": "Last"
      }
    ]
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code