Freigeben über


Player Data Management - Get Player Statistics

Retrieves the indicated statistics (current version and values for all statistics, if none are specified), for the local player.

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

Request Header

Name Required Type Description
X-Authorization True

string

This API requires a client session ticket, available from any Client Login function.

Request Body

Name Type Description
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

StatisticNameVersions

StatisticNameVersion[]

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 (current version will be returned for each)

Responses

Name Type Description
200 OK

GetPlayerStatisticsResult

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

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-Authorization

This API requires a client session ticket, available from any Client Login function.

Type: apiKey
In: header

Definitions

Name Description
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
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

StatisticNameVersions

StatisticNameVersion[]

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 (current version will be returned for each)

GetPlayerStatisticsResult

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

Name Type Description
Statistics

StatisticValue[]

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