Player Data Management - Get Player Statistics

Retrieves the current version and values for the indicated statistics, for the local player.

POST https://titleId.playfabapi.com/Server/GetPlayerStatistics

Request Body

Name Required Type Description
PlayFabId True
  • string

user for whom statistics are being requested

StatisticNameVersions

statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned)

StatisticNames
  • string[]

statistics to return

Responses

Name Type Description
200 OK

In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab.

400 Bad Request

This is the outer wrapper for all responses with errors

Security

SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

ApiErrorWrapper

The basic wrapper around every failed API response

GetPlayerStatisticsRequest
GetPlayerStatisticsResult

In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab.

StatisticNameVersion
StatisticValue

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • integer

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • integer

Numerical PlayFab error code

errorDetails
  • object

Detailed description of individual issues with the request object

errorMessage
  • string

Description for the PlayFab errorCode

status
  • string

String HTTP code

GetPlayerStatisticsRequest

Name Type Description
PlayFabId
  • string

user for whom statistics are being requested

StatisticNameVersions

statistics to return, if StatisticNames is not set (only statistics which have a version matching that provided will be returned)

StatisticNames
  • string[]

statistics to return

GetPlayerStatisticsResult

In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab.

Name Type Description
PlayFabId
  • string

PlayFab unique identifier of the user whose statistics are being returned

Statistics

User statistics for the requested user.

StatisticNameVersion

Name Type Description
StatisticName
  • string

unique name of the statistic

Version
  • number

the version of the statistic to be returned

StatisticValue

Name Type Description
StatisticName
  • string

unique name of the statistic

Value
  • number

statistic value for the player

Version
  • number

for updates to an existing statistic value for a player, the version of the statistic when it was loaded