PGOS Backend HTTP API
Download OpenAPI specification:Download
This is the backend http api document of PGOS.
Possible status code:
404: http API url might not be right.
429: the rate of request exceeds the API frequency limit.
5xx: backend server error, please contact PGOS team.
Possible result code in reponse:
16, 17, 18: header parameters invalid, please make sure the TitleId, TitleRegionId, SecretId, ServerTicket field in headers is correct.
VerifyAuthTicket
Verify auth_ticket.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
auth_ticket | string Auth ticket which obtained from PGOS SDK. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "auth_ticket": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
UpdatePlayerDisplayName
Update player displayname.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
display_name | string Player display_name. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "display_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
CheckDisplayName
Check displayname,This interface checks display name length limits, character sets, regular expression configurations, uniqueness, and profanity.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
display_name | string Display name. |
Responses
Request samples
- Payload
{- "display_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
CheckInput
Check profanity of player input.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
text | string Input text. |
object (UicInfo) |
Responses
Request samples
- Payload
{- "text": "string",
- "uic_info": {
- "scene_id": 0,
- "extra": "string",
- "account_info": {
- "account": "string",
- "area_id": 0,
- "plat_id": 0,
- "world_id": 0,
- "role_id": "string",
- "role_name": "string",
- "role_level": 0,
- "role_pic_url": "string",
- "account_type": 0
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "is_profane": true,
- "is_malicious": true,
- "filtered_text": "string"
}
}
GetPlayerDetail
Get player detail information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID, can not be empty. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}
}
BatchGetPlayerDetail
Batch get players detail information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player ID list. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}, - "property2": {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
GetPlayerInfo
Get player information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}
BatchGetPlayerInfo
Batch get players information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player ID list. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "property2": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
GetBlocklist
Get the blocklist of a player.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_info_list": [
- {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
]
}
}
BatchGetPlayerPresence
Batch get players presence.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player ID list. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "presence": "string",
- "status": 0
}, - "property2": {
- "presence": "string",
- "status": 0
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
BatchGetPlatformPlayerInfo
Batch get platform player info.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
account_open_ids | Array of strings Account open id list. |
account_provider | integer <uint32> Account provider, 0: fake account, 1: INTL, 2: MSDK, 3: WeGame, 4: PlayFab, 5: Steam, 6: Epic, 7: XBOX Xbox Live, 8: Playstation Network, 9: Nintendo switch |
Responses
Request samples
- Payload
{- "account_open_ids": [
- "string"
], - "account_provider": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "player_presence": {
- "presence": "string",
- "status": 0
}
}, - "property2": {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "player_presence": {
- "presence": "string",
- "status": 0
}
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
GetPrivacy
Get player privacy.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "allow_searched_by_others": true,
- "allow_friend_request": true,
- "allow_nonfriend_perschat": true,
- "allow_group_invitation": true,
- "chat_strategy": 0
}
}
BatchGetPrivacy
Batch get players privacy.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player id list. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "allow_searched_by_others": true,
- "allow_friend_request": true,
- "allow_nonfriend_perschat": true,
- "allow_group_invitation": true,
- "chat_strategy": 0
}, - "property2": {
- "allow_searched_by_others": true,
- "allow_friend_request": true,
- "allow_nonfriend_perschat": true,
- "allow_group_invitation": true,
- "chat_strategy": 0
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
PlayerIDToOpenID
Player id to account open id.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "account_open_id": "string",
- "account_provider": 0
}
}
BatchPlayerIDToOpenID
Batch player id to account open id.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player id list, length <= 100. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": "string",
- "property2": "string"
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
BatchPlayerIDToOpenIDV1
Batch player id to account open id.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player id list, length <= 100. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "account_open_id": "string",
- "account_provider": 0
}, - "property2": {
- "account_open_id": "string",
- "account_provider": 0
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
OpenIDToPlayerID
Account open id to player id.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
account_open_id | string Account open id. |
account_provider | integer <uint32> Account provider, 0: fake account, 1: INTL, 2: MSDK, 3: WeGame, 4: PlayFab, 5: Steam, 6: Epic, 7: XBOX Xbox Live, 8: Playstation Network, 9: Nintendo switch |
Responses
Request samples
- Payload
{- "account_open_id": "string",
- "account_provider": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string"
}
}
BatchOpenIDToPlayerID
Batch account open id to player id.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
account_open_ids | Array of strings Account open id list. |
account_provider | integer <uint32> Account provider, 0: fake account, 1: INTL, 2: MSDK, 3: WeGame, 4: PlayFab, 5: Steam, 6: Epic, 7: XBOX Xbox Live, 8: Playstation Network, 9: Nintendo switch |
Responses
Request samples
- Payload
{- "account_open_ids": [
- "string"
], - "account_provider": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": "string",
- "property2": "string"
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
BanPlayer
Ban the player, the player will no longer be able to log in to pgos during the ban period.If kickout is set to true,Calling this API will trigger event System::OnPlayerSessionChanged of type SessionExpired_KickoutByBan on the game client, and you can add event observers through the PgosSDK.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
reason | string Ban reason, 0 < length <= 512. |
duration | integer <int64> Unix timestamp in seconds,If the duration is less than or equal to 0, it is considered to be permanently banned. |
operator | string Who ban the player, 1 < length <= 128. |
kickout | boolean If true kick the player offline. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "reason": "string",
- "duration": 0,
- "operator": "string",
- "kickout": true
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "ban_id": "string"
}
}
RevokePlayerBan
Revoke player ban.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
operator | string Who revoke the player ban, 1 < length <= 128. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "operator": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetPlayerBanInfo
Get player ban information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "is_banned": true,
- "ban_id": "string",
- "created_time": 0,
- "expired_time": 0,
- "reason": "string",
- "operator": "string"
}
}
KickOutPlayer
Kick out PlayerCalling this API will trigger event System::OnPlayerSessionChanged of type SessionExpired_KickoutByGame on the game client, and you can add event observers through the PgosSDK.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
operator | string Opertaor. |
player_id | string Player ID. |
msg | string Message, will send to game client on System::OnPlayerSessionChanged event. length <= 256 bytes. |
Responses
Request samples
- Payload
{- "operator": "string",
- "player_id": "string",
- "msg": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
SetPlayersPunishItems
Add punishment items to specific players.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player ID list, 0 < length <= 1000. |
punish_types | Array of strings Punishment types, such as: PublicChatSendMsg, PrivateChatSendMsg, GroupChatSendMsg, FriendRequest, PlayerUpdateDisplayName, PlayerSearch, GroupUpdateTextInfo, Voice, PartyChatSendMsg, LobbyChatSendMsg, InstantChatSendMsg, FriendRemark. 0 < length <= 100. |
deadline | integer <int64> Unix timestamp (in seconds) at the end of the punishment, <= 0 means permanent punishment. |
operator | string Operator, 0 < length <= 200 bytes. |
reason | string Punishment reason, 0 <= length <= 3000 bytes. |
object Optional, customized extra info, such as: area, plat, world, etc. Maximum number of key-value pairs is 50, maximum length of key is 50, maximum length of value is 200. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
], - "punish_types": [
- "string"
], - "deadline": 0,
- "operator": "string",
- "reason": "string",
- "extra": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
RevokePlayersPunishItems
Remove punishment items from specific players.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player ID list, 0 < length <= 1000. |
punish_types | Array of strings Punishment types, such as: PublicChatSendMsg, PrivateChatSendMsg, GroupChatSendMsg, FriendRequest, PlayerUpdateDisplayName, PlayerSearch, GroupUpdateTextInfo Voice, PartyChatSendMsg, LobbyChatSendMsg, InstantChatSendMsg, FriendRemark 0 < length <= 100. |
operator | string Operator, 0 < length <= 200 bytes. |
reason | string Punishment reason, 0 <= length <= 3000 bytes. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
], - "punish_types": [
- "string"
], - "operator": "string",
- "reason": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
QueryPlayersPunishItems
Query punishment items for specific player.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player ID list, 0 < length <= 1000. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "punish_map": {
- "property1": {
- "items": [
- {
- "player_id": "string",
- "punish_type": "string",
- "source": "string",
- "start_time": 0,
- "deadline": 0,
- "operator": "string",
- "reason": "string",
- "extra": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "property2": {
- "items": [
- {
- "player_id": "string",
- "punish_type": "string",
- "source": "string",
- "start_time": 0,
- "deadline": 0,
- "operator": "string",
- "reason": "string",
- "extra": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
}
}
GetPlayerDetailByDisplayName
Get player detail by display_name.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
display_name | string Player's display name. |
Responses
Request samples
- Payload
{- "display_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}
}
GetPlayerDetailListByDisplayName
Get player detail list by display_name.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
display_name | string Player's display name. |
Responses
Request samples
- Payload
{- "display_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_detail_list": [
- {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}
]
}
}
BatchGetPlayerDetailListByDisplayNames
Batch get player detail list by display_name.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
display_names | Array of strings Player's display name list. |
Responses
Request samples
- Payload
{- "display_names": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_detail_list": [
- {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}
]
}
}
BatchGetPlayerDetailsByDisplayNames
Batch get player detail by display_name (deprecated).
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
display_names | Array of strings Player's display name list. |
Responses
Request samples
- Payload
{- "display_names": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_detail_infos": {
- "property1": {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}, - "property2": {
- "player_id": "string",
- "display_name": "string",
- "avatar_uri": "string",
- "language": "string",
- "gender": "string",
- "first_login_time": 0,
- "last_login_time": 0,
- "last_logout_time": 0,
- "total_time": 0,
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_open_id": "string",
- "account_id": "string",
- "os": 0,
- "cur_login_time": 0,
- "last_login_ip": "string",
- "cur_login_ip": "string",
- "account_provider": 0
}
}
}
}
BatchSetPlayerKVData
Set player kvdata in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
object Data map: key is player id, value are kvdata items. | |||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "property1": {
- "kvdata": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "kvdata": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "failed_players": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
BatchSetPlayerVersionedKVData
Set player versioned kvdata in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
object Data map: key is player id, value are kvdata items. | |||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "property1": {
- "version": 0,
- "kvdata": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "version": 0,
- "kvdata": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "result": {
- "err_code": 0,
- "msg": "string"
}, - "version": 0,
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}
}, - "property2": {
- "result": {
- "err_code": 0,
- "msg": "string"
}, - "version": 0,
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}
}
}
}
}
BatchGetPlayerKVData
Get player kvdata in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player IDs. |
keys | Array of strings If keys is empty, will query all kvdata items of the specified players. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
], - "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "failed_keys": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "failed_keys": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}, - "failed_players": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
BatchGetPlayerVersionedKVData
Get player versioned kvdata in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player IDs. |
keys | Array of strings If keys is empty, will query all versioned kvdata items of the specified players. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
], - "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "version": 0,
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "failed_keys": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}
}, - "property2": {
- "version": 0,
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "failed_keys": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}
}
}, - "failed_players": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}
}
}
BatchIncrPlayerKVData
Player kvdata atomic operation in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
object Data map: key is player id, value are increments of kvdata items. | |||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "property1": {
- "kvdata": {
- "property1": "string",
- "property2": "string"
}, - "idempotency_token": "string"
}, - "property2": {
- "kvdata": {
- "property1": "string",
- "property2": "string"
}, - "idempotency_token": "string"
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "replayed": true
}, - "property2": {
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "replayed": true
}
}, - "failed_players": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
GetPlayerKVDataTemplates
Get player kvdata templates which defined in PGOS portal.
Request body is empty.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Responses
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": [
- {
- "key": "string",
- "default_value": "string",
- "type": 0,
- "versioned": true,
- "server_only": true,
- "client_writable": true,
- "client_public": true
}
]
}
}
SetPlayerKVData
Set player kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
object Player's kvdata items map: key is kvdata's key, value is kvdata's value. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "data": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
SetPlayerVersionedKVData
Set player versioned kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
version | integer <uint32> The player-wide version of the player kvdata. |
object Player's kvdata items map: key is kvdata's key, value is kvdata's value. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "version": 0,
- "data": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "version": 0,
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}
}
}
GetPlayerKVData
Get player kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
keys | Array of strings If keys is empty, will query all kvdata items of the specified player. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "failed_keys": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
GetPlayerVersionedKVData
Get player versioned kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
keys | Array of strings If keys is empty, will query all versioned kvdata items of the specified player. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "version": 0,
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "failed_keys": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}
}
}
IncrPlayerKVData
Player kvdata atomic operation in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
object Player's kvdata items map: key is kvdata's key, value is increment of kvdata. | |
idempotency_token | string Idempotency token: only valid when idempotence is required. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "data": {
- "property1": "string",
- "property2": "string"
}, - "idempotency_token": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "replayed": true
}
}
SetOnePlayerKVData
Set one player kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
key | string Key. |
value | string Value. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "key": "string",
- "value": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetOnePlayerKVData
Get one player kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
key | string Key. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "key": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "key": "string",
- "value": "string",
- "type": 0
}
}
IncrOnePlayerKVData
One player kvdata atomic operation.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
key | string Key. |
incr | string Increment. |
idempotency_token | string Idempotency token: only valid when idempotence is required. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "key": "string",
- "incr": "string",
- "idempotency_token": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "key": "string",
- "value": "string",
- "type": 0,
- "replayed": true
}
}
GetPlayerGroupKVData
Get player group kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
group_name | string Group name. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "group_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}
}
}
BatchGetPlayerGroupKVData
Get player group kvdata in batches.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player IDs. |
group_name | string Group name. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
], - "group_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}
}, - "property2": {
- "kvdata": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}
}
}, - "failed_players": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "fail_players": {
- "property1": "string",
- "property2": "string"
}
}
}
GetBlobInfo
Get blob data of a player, including metadata and full url.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
key | string Blob data key. |
player_id | string Player id. |
Responses
Request samples
- Payload
{- "key": "string",
- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "obj_key": "string",
- "host": "string",
- "ver": 0,
- "size": 0,
- "hash": "string",
- "last_modified_ts": 0,
- "last_modified_gmt": "string",
- "auth_string": "string",
- "provider": "string",
- "full_url": "string"
}
}
BatchGetBlobInfo
Get blob data of a bunch of players, including metadata and full url.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
keys | Array of strings Blob data keys. |
player_id | string Player id. |
Responses
Request samples
- Payload
{- "keys": [
- "string"
], - "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "property1": {
- "obj_key": "string",
- "host": "string",
- "ver": 0,
- "size": 0,
- "hash": "string",
- "last_modified_ts": 0,
- "last_modified_gmt": "string",
- "auth_string": "string",
- "provider": "string",
- "full_url": "string"
}, - "property2": {
- "obj_key": "string",
- "host": "string",
- "ver": 0,
- "size": 0,
- "hash": "string",
- "last_modified_ts": 0,
- "last_modified_gmt": "string",
- "auth_string": "string",
- "provider": "string",
- "full_url": "string"
}
}
}
MarkPlayerAsDeleting
Mark player as in deleting status. After invoking this API, the player will be unable to log in to PGOS.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID to operate on. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
ClearDeletingStatus
Clear player deleting status. After invoking this API, the player will be able to log in to PGOS normally.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID to operate on. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
CheckPlayerDeletionStatus
Check if the player is under deletion status.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID to operate on. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_id": "string",
- "deletion_status": 0,
- "marked_time": 0
}
}
ActualDeletePlayer
Actually delete player profile. After invoking this API, the player account will be completely deleted.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID to operate on. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetFriendList
Get player's friend list.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id,can not be empty. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "friend_info_list": [
- {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "player_presence": {
- "presence": "string",
- "status": 0
}, - "created_time": 0,
- "remark": "string"
}
]
}
}
GetFriendCount
Get player's friend count.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id,can not be empty. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "total_count": 0
}
}
GetFriendIDs
Get player's friend ids.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id,can not be empty. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "friend_ids": [
- "string"
]
}
}
SetRemark
Set player's friend remark.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player's ID. |
peer_player_id | string Player's friend ID. |
remark | string Player's friend remark. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "peer_player_id": "string",
- "remark": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
BatchSetPlayerFriendsLimit
Set player's friends limit.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
Array of objects (PlayerFriendsLimit) Player's friends limit, 0 < length <= 100. | |||||
Array
|
Responses
Request samples
- Payload
{- "player_friends_limit": [
- {
- "player_id": "string",
- "friends_limit": 0
}
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
BatchGetPlayerFriendsLimit
Get player's friends limit.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings Player IDs, 0 < length <= 100. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_friends_limit": [
- {
- "player_id": "string",
- "friends_limit": 0
}
]
}
}
SendPublicChatSysMsg
Send a system message into the pubchat channel from game backend.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
channel_name | string Public chat channel name. |
content | string The content of message. |
duration_sec | integer <uint32> The duration of message, in second. (Value > 0). |
custom_data | string The custom data of message, defined by game. (Optional). |
Responses
Request samples
- Payload
{- "channel_name": "string",
- "content": "string",
- "duration_sec": 0,
- "custom_data": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetGroupList
Get player's joined group list.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "group_list": [
- {
- "group_id": "string",
- "name": "string",
- "icon": "string",
- "player_nickname": "string",
- "player_remark": "string"
}
]
}
}
GetGroupMembers
Get group members.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Specifed group id to get members. |
Responses
Request samples
- Payload
{- "group_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "group_members": {
- "property1": {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "nickname": "string",
- "remark": "string",
- "is_owner": true,
- "is_admin": true,
- "player_presence": {
- "presence": "string",
- "status": 0
}, - "joined_time": 0,
- "custom_data": "string"
}, - "property2": {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "nickname": "string",
- "remark": "string",
- "is_owner": true,
- "is_admin": true,
- "player_presence": {
- "presence": "string",
- "status": 0
}, - "joined_time": 0,
- "custom_data": "string"
}
}, - "muted_members": {
- "property1": {
- "player_id": "string",
- "display_name": "string",
- "group_nickname": "string",
- "remark": "string",
- "operator_id": "string",
- "operator_display_name": "string",
- "mute_created_time": 0,
- "mute_expired_time": 0,
- "joined_time": 0
}, - "property2": {
- "player_id": "string",
- "display_name": "string",
- "group_nickname": "string",
- "remark": "string",
- "operator_id": "string",
- "operator_display_name": "string",
- "mute_created_time": 0,
- "mute_expired_time": 0,
- "joined_time": 0
}
}
}
}
GetGroupInfo
Get basic information of a group.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string The unique ID of the group to retrieve information for. |
Responses
Request samples
- Payload
{- "group_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "group_info": {
- "group_id": "string",
- "owner_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "name": "string",
- "icon": "string",
- "description": "string",
- "member_count": 0,
- "max_members": 0,
- "created_time": 0,
- "is_official": true,
- "tags": [
- "string"
], - "join_rule": 0,
- "global_custom_data": {
- "property1": "string",
- "property2": "string"
}
}
}
}
SetGroupInfo
Set group information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group ID, 0 < length. |
name | string The group name to be modified; if it is empty, no changes will be made. length <= 300 bytes. |
description | string The group description to be modified; if it is empty, no changes will be made. length <= 1024 bytes. |
announcement | string The group announcement to be modified; if it is empty, no changes will be made. length <= 1024 bytes. |
Responses
Request samples
- Payload
{- "group_id": "string",
- "name": "string",
- "description": "string",
- "announcement": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
SetGroupMemberInfo
Set group member's information.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group ID, 0 < length. |
player_id | string Player ID, 0 < length. |
nickname | string The group member's nickname to be modified; if it is empty, no changes will be made.length <= 300 bytes. |
remark | string The group member's remark to be modified; if it is empty, no changes will be made.length <= 300 bytes. |
Responses
Request samples
- Payload
{- "group_id": "string",
- "player_id": "string",
- "nickname": "string",
- "remark": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
DismissGroup
Dismiss group.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group ID, 0 < length. |
reason | string Reason for dismissing group, 0 < length <= 256 bytes. |
source_type | string Trigger source, such as IDIP, VirtualServer and other not mentioned please contact us to confirm. 0 < length <= 256 bytes. |
Responses
Request samples
- Payload
{- "group_id": "string",
- "reason": "string",
- "source_type": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
SetGroupGlobalCustomData
Set Group Global Custom Data.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group ID. |
object Global custom data. |
Responses
Request samples
- Payload
{- "group_id": "string",
- "global_custom_data": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "global_custom_data": {
- "property1": "string",
- "property2": "string"
}
}
}
DelGroupGlobalCustomData
Delete Group Global Custom Data.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group ID. |
keys | Array of strings Delete keys. |
Responses
Request samples
- Payload
{- "group_id": "string",
- "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "global_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
ClearGroupGlobalCustomData
Clear Group Global Custom Data.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group id. |
Responses
Request samples
- Payload
{- "group_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
BatchSetGroupPlayerCustomData
Batch Set Group Player Custom Data.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
group_id | string Group id. |
object Key is player id, value is player custom data. |
Responses
Request samples
- Payload
{- "group_id": "string",
- "player_custom_data": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
GetTitleRegionConfigKVData
Get region config kvdata of the title.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
keys | Array of strings Title data keys to get. |
Responses
Request samples
- Payload
{- "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
AddOverallBan
Add Overall Ban.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
ugc | boolean User Generated Content, like display name、 avatar etc. |
search | boolean Search operation, like player etc. |
start_time | integer <int64> The time when the ban takes effect, unix timestamp. |
expire_time | integer <int64> Ban end time, unix timestamp. |
operator | string Operator. |
Responses
Request samples
- Payload
{- "ugc": true,
- "search": true,
- "start_time": 0,
- "expire_time": 0,
- "operator": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
UpdateOverallBan
Update Overall Ban.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
ban_id | string Ban ID, length > 0. |
ugc | boolean User Generated Content, like display name、 avatar etc. |
search | boolean Search operation, like player etc. |
start_time | integer <int64> The time when the ban takes effect, unix timestamp. |
expire_time | integer <int64> Ban end time, unix timestamp. |
operator | string Operator. |
Responses
Request samples
- Payload
{- "ban_id": "string",
- "ugc": true,
- "search": true,
- "start_time": 0,
- "expire_time": 0,
- "operator": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
RevokeOverallBan
Revoke Overall Ban.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
ban_id | string Ban ID, length > 0. |
operator | string Operator. |
Responses
Request samples
- Payload
{- "ban_id": "string",
- "operator": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetAllOverallBanInfo
Get All Overall Ban Info.
Request body is empty.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Responses
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "ban_info_list": [
- {
- "ban_id": "string",
- "ugc": true,
- "search": true,
- "ban_status": 0,
- "ban_start_time": 0,
- "ban_expire_time": 0,
- "created_time": 0,
- "updated_time": 0,
- "operator": "string"
}
]
}
}
GetTitleConfigKVData
Get title config kvdata.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
keys | Array of strings Key list, if list is null, return all keys. |
Responses
Request samples
- Payload
{- "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
GetTitleFileInfo
Get title file info.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
paths | Array of strings File path list, path must start with /. |
url_valid_time | integer <uint32> The valid time of the URL in seconds. |
Responses
Request samples
- Payload
{- "paths": [
- "string"
], - "url_valid_time": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "data": {
- "property1": {
- "url": "string",
- "file_name": "string",
- "updated_time": 0,
- "file_size": 0,
- "file_md5": "string"
}, - "property2": {
- "url": "string",
- "file_name": "string",
- "updated_time": 0,
- "file_size": 0,
- "file_md5": "string"
}
}, - "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
RequestBattleSessionID
Request battle session id for a battle session placement.The API will return a battle session id which is an UUID generated by PGOS backend.
Request body is empty.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Responses
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "battle_session_id": "string"
}
}
StartBattleSessionPlacement
Start a battle session placement.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Unique battle session id to identify the placement. The battle session id is also for idempotency, which ensure the placement You can generate the battle session id by yourself or by calling RequestBattleSessionID. The length of the ID must be between 1 and 64 characters. |
placer | string PGOS Placer name. |
max_players | integer <uint64> Maximum player count of this battle session. |
Array of objects (BattlePlayer) Custom attributes of players in this battle session. | |
Array of objects (BattleProperty) Custom attributes of this battle session. | |
is_local_ds | boolean Whether to use Local DS mechanism, placer name refers to local placer if is true. |
map_name | string The map name of the battle session, and it can be null if not necessary. |
battle_session_data | string Battle session data passed to DS in OnStartBattleSession. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "placer": "string",
- "max_players": 0,
- "battle_players": [
- {
- "player_id": "string",
- "player_attributes": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "team": "string",
- "ip": "string",
- "longtitude": "string",
- "latitude": "string"
}
], - "battle_properties": [
- {
- "key": "string",
- "value": "string"
}
], - "is_local_ds": true,
- "map_name": "string",
- "battle_session_data": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "battle_session_id": "string"
}
}
QueryBattleSessions
Query battle sessions with condition. The API will return the information about the battle session including status.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
placer | string PGOS placer. |
offset | integer <uint32> Query offset. |
count | integer <uint32> Query count, maximum limit is 100. |
Responses
Request samples
- Payload
{- "placer": "string",
- "offset": 0,
- "count": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "battle_sessions": [
- {
- "battle_session_id": "string",
- "placer": "string",
- "fleet_id": "string",
- "max_players": 0,
- "total_players": 0,
- "current_players": 0,
- "source_type": "string",
- "configuration_name": "string",
- "battle_properties": [
- {
- "key": "string",
- "value": "string"
}
], - "port": 0,
- "ip_address": "string",
- "battle_session_status": "string",
- "battle_session_status_msg": "string",
- "created_time": 0,
- "terminated_time": 0
}
], - "next_offset": 0,
- "has_more": true
}
}
DescribeBattleSessionPlacement
Describe battle session placement of specified battle session id.The API will return the information about the battle session including status.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id of the placement to retrieve information for. |
Responses
Request samples
- Payload
{- "battle_session_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "battle_session_id": "string",
- "fleet_id": "string",
- "max_players": 0,
- "source_type": "string",
- "battle_properties": [
- {
- "key": "string",
- "value": "string"
}
], - "port": 0,
- "ip_address": "string",
- "battle_session_status": "string",
- "battle_session_status_msg": "string",
- "created_time": 0,
- "terminated_time": 0,
- "player_battle_sessions": [
- {
- "player_id": "string",
- "player_battle_session_id": "string",
- "player_battle_session_status": "string",
- "created_time": 0,
- "terminated_time": 0
}
], - "ruleset_name": "string",
- "zone": "string",
- "map_name": "string"
}
}
CancelBattleSessionPlacement
Cancel battle session placement.The specified battle session status will move to CANCELLED
if it is still PENDING
for placement,ortherwise if the battle session is already ACTIVE
, it will move to TERMINATED
if successful.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id. |
Responses
Request samples
- Payload
{- "battle_session_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
AddPlayersToBattleSession
Add players to battle session.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id. |
Array of objects (BattlePlayer) Custom attributes of players to add in battle session. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "battle_players": [
- {
- "player_id": "string",
- "player_attributes": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "team": "string",
- "ip": "string",
- "longtitude": "string",
- "latitude": "string"
}
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "new_player_battle_sessions": [
- {
- "battle_session_id": "string",
- "player_battle_session_id": "string",
- "player_id": "string",
- "fleet_id": "string",
- "ip_address": "string",
- "port": 0,
- "source_type": "string",
- "battle_properties": [
- {
- "key": "string",
- "value": "string"
}
], - "player_battle_session_status": "string",
- "battle_session_status": "string",
- "battle_session_status_msg": "string",
- "placing_timeout": 0,
- "created_time": 0,
- "terminated_time": 0,
- "map_name": "string"
}
]
}
}
QueryPlayerBattleSessions
Query player battle sessions. The API will return all the current battle sessions that the player has joined,which is useful for join/reconnect a battle session.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_battle_sessions": [
- {
- "battle_session_id": "string",
- "player_battle_session_id": "string",
- "player_id": "string",
- "fleet_id": "string",
- "ip_address": "string",
- "port": 0,
- "source_type": "string",
- "battle_properties": [
- {
- "key": "string",
- "value": "string"
}
], - "player_battle_session_status": "string",
- "battle_session_status": "string",
- "battle_session_status_msg": "string",
- "placing_timeout": 0,
- "created_time": 0,
- "terminated_time": 0,
- "map_name": "string"
}
]
}
}
TerminatePlayerBattleSession
Terminate player battle session. The specified player battle session's status will move to COMPLETED
if successful.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id. |
player_battle_session_id | string Player battle session id. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "player_battle_session_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
SetBattleData
Set battle data with custom keys and values.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id. |
object Battle data map. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "data": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
DelBattleData
Delete battle data with specified keys.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id. |
keys | Array of strings Specified keys to delete in battle data. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "fails": {
- "property1": "string",
- "property2": "string"
}
}
}
SetBattleRecord
Set battle record by associating the battle session with a list of tags.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle session id. |
tags | Array of strings Battle data tags. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "tags": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetPlayerBattleRecord
Query player's battle record in asc order within a time range by page. Time range can not exceed a month.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
tags | Array of strings Optional. battle data tags to filter, battle data which contains all specified tags will be returned. |
keys | Array of strings Optional. battle data keys to query, all value of battle data will be returned if keys are empty. |
offset | integer <uint32> Query offset. |
count | integer <uint32> Query count. |
start_time | integer <int64> The start time condition of query. |
end_time | integer <int64> The end time condition of query. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "tags": [
- "string"
], - "keys": [
- "string"
], - "offset": 0,
- "count": 0,
- "start_time": 0,
- "end_time": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "battle_data_list": [
- {
- "battle_session_id": "string",
- "data": {
- "property1": "string",
- "property2": "string"
}, - "tags": [
- "string"
], - "fails": {
- "property1": "string",
- "property2": "string"
}, - "battle_created_time": 0
}
], - "next_offset": 0
}
}
GetLobbyDetail
Get lobby detail data, which includes full detailed informationof lobby, such as teams, players and other status fields.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
lobby_id | string Lobby ID. |
Responses
Request samples
- Payload
{- "lobby_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "lobby": {
- "lobby_id": "string",
- "lobby_owner": {
- "player_id": "string",
- "team_name": "string",
- "team_slot": 0,
- "source": 0,
- "ready": true,
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}, - "lobby_config": "string",
- "lobby_seq": 0,
- "name": "string",
- "status": 0,
- "status_reason": 0,
- "privacy": 0,
- "protection": 0,
- "password": "string",
- "player_count": 0,
- "player_limit": 0,
- "chat_channel_id": "string",
- "battle_session_id": "string",
- "teams": [
- {
- "name": "string",
- "capacity": 0,
- "players": {
- "property1": {
- "player_id": "string",
- "team_name": "string",
- "team_slot": 0,
- "source": 0,
- "ready": true,
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": null,
- "type": null
}, - "property2": {
- "value": null,
- "type": null
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}, - "property2": {
- "player_id": "string",
- "team_name": "string",
- "team_slot": 0,
- "source": 0,
- "ready": true,
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": null,
- "type": null
}, - "property2": {
- "value": null,
- "type": null
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}
}, - "start_battle_condition": 0,
- "group": "string"
}
], - "kv_data": {
- "property1": "string",
- "property2": "string"
}, - "preparing_timeout": 0,
- "placing_timeout": 0,
- "player_kv_data": {
- "property1": "string",
- "property2": "string"
}, - "battle_session_provider": "string",
- "game_mode": "string"
}
}
}
EndLobbyBattle
End the battle session of lobby manually. Force the lobby back to"waiting" status.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
lobby_id | string Public: Lobby ID. |
battle_session_id | string Public: Battle Session ID of lobby. |
Responses
Request samples
- Payload
{- "lobby_id": "string",
- "battle_session_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "lobby": {
- "lobby_id": "string",
- "lobby_owner": {
- "player_id": "string",
- "team_name": "string",
- "team_slot": 0,
- "source": 0,
- "ready": true,
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}, - "lobby_config": "string",
- "lobby_seq": 0,
- "name": "string",
- "status": 0,
- "status_reason": 0,
- "privacy": 0,
- "protection": 0,
- "password": "string",
- "player_count": 0,
- "player_limit": 0,
- "chat_channel_id": "string",
- "battle_session_id": "string",
- "teams": [
- {
- "name": "string",
- "capacity": 0,
- "players": {
- "property1": {
- "player_id": "string",
- "team_name": "string",
- "team_slot": 0,
- "source": 0,
- "ready": true,
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": null,
- "type": null
}, - "property2": {
- "value": null,
- "type": null
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}, - "property2": {
- "player_id": "string",
- "team_name": "string",
- "team_slot": 0,
- "source": 0,
- "ready": true,
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": null,
- "type": null
}, - "property2": {
- "value": null,
- "type": null
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}
}, - "start_battle_condition": 0,
- "group": "string"
}
], - "kv_data": {
- "property1": "string",
- "property2": "string"
}, - "preparing_timeout": 0,
- "placing_timeout": 0,
- "player_kv_data": {
- "property1": "string",
- "property2": "string"
}, - "battle_session_provider": "string",
- "game_mode": "string"
}
}
}
GetPlayersCurrentPartyIds
Get the current party ids of players, if a player is not in any party currently, the corresponding party id is empty string.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_ids | Array of strings The player ids. |
Responses
Request samples
- Payload
{- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "player_party_ids": {
- "property1": "string",
- "property2": "string"
}
}
}
GetPartyInfo
Get parties info by party ids.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
party_id | string The party id. |
Responses
Request samples
- Payload
{- "party_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "party_info": {
- "party_id": "string",
- "name": "string",
- "leader": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "created_time": 0,
- "members": [
- {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
], - "max_player": 0,
- "chat_channel_id": "string",
- "custom_data": {
- "version": 0,
- "global_custom_data": "string",
- "player_custom_data": {
- "property1": "string",
- "property2": "string"
}
}, - "join_strategy": 0,
- "invite_strategy": 0
}
}
}
GrantItemsToPlayer
Grant items to player. The granted items will be instantiated in specified player's inventory.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
Array of objects (GrantedItem) Items to be granted. | |
idempotency_token | string Idempotency token that ensure the original request completes only once. |
event_custom_data | string Custom data which will be passed to EventItemGranted. |
object (PayPlatformData) |
Responses
Request samples
- Payload
{- "player_id": "string",
- "items": [
- {
- "item_id": "string",
- "amount": 0,
- "mutable_custom_data": {
- "property1": "string",
- "property2": "string"
}
}
], - "idempotency_token": "string",
- "event_custom_data": "string",
- "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "item_instances": [
- {
- "instance_id": "string",
- "accessories": {
- "property1": "string",
- "property2": "string"
}, - "amount": 0,
- "status": 0,
- "item_id": "string",
- "created_time": 0,
- "updated_time": 0,
- "expired_time": 0,
- "time_to_live": 0,
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "mutable_custom_data_version": 0,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}, - "pay_platform": "string"
}
], - "items": {
- "property1": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}, - "property2": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}
}, - "currencies": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "all_currencies": {
- "property1": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}, - "property2": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}
}, - "conflict_unique_items": [
- {
- "item_id": "string",
- "amount": 0
}
], - "replayed": true,
- "failed_currencies": {
- "property1": "string",
- "property2": "string"
}
}
}
GrantCurrencyToPlayer
Increase player's balance of specified virtual currency by the stated amount.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to be operated. |
object (UpdatedCurrency) currencies to be updated | |
idempotency_token | string Idempotency token that ensure the original request completes only once. |
event_custom_data | string Custom data which will be passed to EventCurrencyChanged. |
object (PayPlatformData) |
Responses
Request samples
- Payload
{- "player_id": "string",
- "granted_currency": {
- "currency_code": "string",
- "amount": 0
}, - "idempotency_token": "string",
- "event_custom_data": "string",
- "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "replayed": true
}
}
BatchGrantVirtualCurrenciesToPlayer
Increase player's balance of multiple specified virtual currencies.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to be operated. |
Array of objects (UpdatedCurrency) Currencies to be granted. | |
idempotency_token | string Idempotency token that ensure the original request completes only once. |
event_custom_data | string Custom data which will be passed to EventCurrencyChanged. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "granted_currencies": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "idempotency_token": "string",
- "event_custom_data": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "replayed": true
}
}
SubtractPlayerVirtualCurrencies
Subtract player's balance of specified virtual currency by the stated amount.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to be operated. |
Array of objects (UpdatedCurrency) Currencies to be subtracted. | |
idempotency_token | string Idempotency token that ensure the original request completes only once. |
event_custom_data | string Custom data which will be passed to EventCurrencyChanged. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "subtract_currencies": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "idempotency_token": "string",
- "event_custom_data": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "replayed": true
}
}
SubtractPlayerCurrency
Subtract player's balance of multiple specified virtual currencies.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to be operated. |
object (UpdatedCurrency) currencies to be updated | |
idempotency_token | string Idempotency token that ensure the original request completes only once. |
event_custom_data | string Custom data which will be passed to EventCurrencyChanged. |
object (PayPlatformData) |
Responses
Request samples
- Payload
{- "player_id": "string",
- "subtract_currency": {
- "currency_code": "string",
- "amount": 0
}, - "idempotency_token": "string",
- "event_custom_data": "string",
- "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "replayed": true
}
}
GetPlayerCurrency
Get player's balance of specified virutal currency.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
currency_codes | Array of strings Currency codes to be queried. It will return all currencies in player's balance if nothing is passed in. |
object (PayPlatformData) |
Responses
Request samples
- Payload
{- "player_id": "string",
- "currency_codes": [
- "string"
], - "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "fails": {
- "property1": "string",
- "property2": "string"
}, - "currencies": [
- {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string",
- "amount": 0,
- "total_spend": 0,
- "created_time": 0,
- "max_deposit": 0
}
]
}
}
GetItemInstanceInfo
Get specified item instances info in player's inventory.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
instance_ids | Array of strings Item instance ids to query. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "instance_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "item_instances": [
- {
- "instance_id": "string",
- "accessories": {
- "property1": "string",
- "property2": "string"
}, - "amount": 0,
- "status": 0,
- "item_id": "string",
- "created_time": 0,
- "updated_time": 0,
- "expired_time": 0,
- "time_to_live": 0,
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "mutable_custom_data_version": 0,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}, - "pay_platform": "string"
}
], - "fails": {
- "property1": "string",
- "property2": "string"
}, - "items": {
- "property1": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}, - "property2": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}
}, - "all_currencies": {
- "property1": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}, - "property2": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}
}
}
}
GetPlayerInventory
Get all the item instances of specified player's inventory.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to get inventory. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "item_instances": [
- {
- "instance_id": "string",
- "accessories": {
- "property1": "string",
- "property2": "string"
}, - "amount": 0,
- "status": 0,
- "item_id": "string",
- "created_time": 0,
- "updated_time": 0,
- "expired_time": 0,
- "time_to_live": 0,
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "mutable_custom_data_version": 0,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "pay_platform_data": {
- "midas_global": {
- "platform": "string",
- "app_id": "string",
- "role_id": "string",
- "env": "string"
}
}, - "pay_platform": "string"
}
], - "items": {
- "property1": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}, - "property2": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}
}, - "all_currencies": {
- "property1": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}, - "property2": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}
}
}
}
RevokeItemInstance
Revoke specified item instance in player's inventory.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to revoke item instance from inventory. |
instance_id | string The unique id of item instance to revoke. |
event_custom_data | string Custom data which will be passed to EventItemInstanceRevoked. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "instance_id": "string",
- "event_custom_data": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "instance_id": "string",
- "left_amount": 0
}
}
SetItemInstanceCustomData
Set specified item instance's custom data.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to set item instance custom data. |
instance_id | string The unique id of item instance to set custom data. |
object Kv data to update. Key prefix must be one of "flt_", "int_", "str_". Max length of each key is 128. | |
delete_keys | Array of strings Specified keys to delete, which should not be duplicated in field |
Responses
Request samples
- Payload
{- "player_id": "string",
- "instance_id": "string",
- "update_data": {
- "property1": "string",
- "property2": "string"
}, - "delete_keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "version": 0
}
}
SetItemInstanceCustomDataWithVersion
Set specified item instance's custom data with version.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to set item instance custom data. |
instance_id | string The unique id of item instance to set custom data. |
object Kv data to update. Key prefix must be one of "flt_", "int_", "str_". Max length of each key is 128, and max length of value is 4096. Max number of key-value pairs is 32. | |
delete_keys | Array of strings Specified keys to delete, which should not be duplicated in field |
version | integer <int32> The current version of custom data. Error would be returned when version mismatchs. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "instance_id": "string",
- "update_data": {
- "property1": "string",
- "property2": "string"
}, - "delete_keys": [
- "string"
], - "version": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "version": 0
}
}
IncrItemInstanceCustomData
Incr specified item instance's custom data with idempotency token.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to increase item instance custom data. |
instance_id | string The unique id of item instance to increase custom data. |
object Kv data to increase. Key prefix must be one of "flt_", "int_". Max length of each key is 128, and max length of value is 4096. Max number of key-value pairs is 32. | |
idempotency_token | string Idempotency token that ensure the original request completes only once. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "instance_id": "string",
- "increments": {
- "property1": "string",
- "property2": "string"
}, - "idempotency_token": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "version": 0,
- "idempotency_token": "string",
- "replayed": true
}
}
BatchRevokeItemInstances
Batch revoke specified item instance in player's inventory.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to revoke item instance from inventory. |
instance_ids | Array of strings List of the item instance ids to revoke. Max number of instance ids to revoke each time is 99. |
event_custom_data | string Custom data which will be passed to EventItemInstanceRevoked. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "instance_ids": [
- "string"
], - "event_custom_data": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "fails": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "left_amounts": {
- "property1": 0,
- "property2": 0
}
}
}
BatchSetItemInstanceCustomData
Batch set specified item instances custom data.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id to set item instance custom data. |
object Key: instance id, value: custom data to update. Max number of pairs is 99. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "data": {
- "property1": {
- "update_data": {
- "property1": "string",
- "property2": "string"
}, - "delete_keys": [
- "string"
]
}, - "property2": {
- "update_data": {
- "property1": "string",
- "property2": "string"
}, - "delete_keys": [
- "string"
]
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "fails": {
- "property1": {
- "err_code": 0,
- "msg": "string"
}, - "property2": {
- "err_code": 0,
- "msg": "string"
}
}, - "data": {
- "property1": {
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "version": 0
}, - "property2": {
- "mutable_custom_data": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "version": 0
}
}
}
}
UpdateStatItems
Update stat data for specific keys.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
Array of objects (StatItem) Stat items to update. | |||||||||||||||
Array
|
Responses
Request samples
- Payload
{- "items": [
- {
- "stat_name": "string",
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "tags": [
- "string"
], - "aggregate_type": 0,
- "updated_time": 0
}
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "items": [
- {
- "latest_item": {
- "stat_name": "string",
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "tags": [
- "string"
], - "aggregate_type": 0,
- "updated_time": 0
}, - "is_inserted": true,
- "is_modified": true
}
], - "fails": [
- {
- "stat_name": "string",
- "key": "string",
- "err_code": 0,
- "msg": "string"
}
]
}
}
GetStatItems
Get stat data for specific keys for current cycle.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
stat_names | Array of strings A batch of stat item names. |
keys | Array of strings A batch of keys of kv-pairs. |
cycle_name | string The cycle name that is configured on web portal. |
Responses
Request samples
- Payload
{- "stat_names": [
- "string"
], - "keys": [
- "string"
], - "cycle_name": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "items": [
- {
- "stat_name": "string",
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "tags": [
- "string"
], - "aggregate_type": 0,
- "updated_time": 0
}
], - "cycle_name": "string",
- "cycle_round_seq": 0,
- "round_start_time": 0,
- "round_end_time": 0
}
}
GetPersistentStatItems
Get stat data for specific keys for persistent archive.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
stat_names | Array of strings A bunch of stat item names. |
keys | Array of strings A bunch of keys of kv-pairs. |
Responses
Request samples
- Payload
{- "stat_names": [
- "string"
], - "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "items": [
- {
- "stat_name": "string",
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "tags": [
- "string"
], - "aggregate_type": 0,
- "updated_time": 0
}
]
}
}
DeleteStatItems
Delete stat data for specific keys.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
stat_names | Array of strings A bunch of stat item names. |
keys | Array of strings A bunch of keys to delete. |
Responses
Request samples
- Payload
{- "stat_names": [
- "string"
], - "keys": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
CountStatItems
Count stat data for specific keys.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
stat_names | Array of strings A bunch of stat item names. |
Responses
Request samples
- Payload
{- "stat_names": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "property1": 0,
- "property2": 0
}
}
GetCycleCurrentRound
Get current cycle round info.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
cycle_names | Array of strings |
Responses
Request samples
- Payload
{- "cycle_names": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "round_info_map": {
- "property1": {
- "cycle_round_seq": 0,
- "round_start_time": 0,
- "round_end_time": 0,
- "cycle_name": "string"
}, - "property2": {
- "cycle_round_seq": 0,
- "round_start_time": 0,
- "round_end_time": 0,
- "cycle_name": "string"
}
}
}
}
SendMail
Send mail to players. Specify receivers, multi-language contents and attachments in requests.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
receiver_ids | Array of strings Receiver ID list (up to 1000 players at a time). |
category | integer <uint32> Mail category, 0: Invalid value, 1: System mail, 2: Announcement mail, 3: Game event, 4: Item reward, 5: Player gift, 6: Custom |
object Mail multi-language text. | |
default_language | string Default language. |
object (AttachmentInfo) AttachmentInfo: Attachment information | |
custom_data | string Custom data. Optional. |
idempotent_id | string Idempotent ID. Optional. |
object Mail environment variables. Optional. |
Responses
Request samples
- Payload
{- "receiver_ids": [
- "string"
], - "category": 0,
- "text": {
- "property1": {
- "title": "string",
- "content": "string"
}, - "property2": {
- "title": "string",
- "content": "string"
}
}, - "default_language": "string",
- "attachment_info": {
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "is_claimed": true,
- "giver_id": "string"
}, - "custom_data": "string",
- "idempotent_id": "string",
- "env_vars": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mail_id": "string"
}
}
SendMailWithTemplate
Send mail with template. Configure template on web portal first.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
receiver_ids | Array of strings Receiver ID list. |
template_name | string Template name. |
object (AttachmentInfo) AttachmentInfo: Attachment information | |
idempotent_id | string Idempotent ID. Optional. |
object Mail environment variables. Optional. |
Responses
Request samples
- Payload
{- "receiver_ids": [
- "string"
], - "template_name": "string",
- "attachment_info": {
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "is_claimed": true,
- "giver_id": "string"
}, - "idempotent_id": "string",
- "env_vars": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mail_id": "string"
}
}
GetPlayerMails
Get player' mails. This interface supports pagination.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
receiver_id | string Recipient Player ID. |
offset | integer <uint32> Offset. |
count | integer <uint32> Count. |
Responses
Request samples
- Payload
{- "receiver_id": "string",
- "offset": 0,
- "count": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mail_list": [
- {
- "mail_id": "string",
- "sent_time_stamp": 0,
- "category": 0,
- "title": "string",
- "content": "string",
- "attachment_info": {
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "is_claimed": true,
- "giver_id": "string"
}, - "custom_data": "string",
- "is_read": true
}
], - "has_more": true,
- "next_offset": 0,
- "total_num": 0,
- "item_map": {
- "property1": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}, - "property2": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}
}, - "currency_map": {
- "property1": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}, - "property2": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}
}, - "giver_map": {
- "property1": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "property2": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}
}
}
GetDeletedPlayerMails
Get player' deleted mails (deleted mails will be reserved for 3 months).
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
receiver_id | string Recipient Player ID. |
offset | integer <uint32> Offset. |
count | integer <uint32> Count. |
Responses
Request samples
- Payload
{- "receiver_id": "string",
- "offset": 0,
- "count": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mail_list": [
- {
- "mail_id": "string",
- "sent_time_stamp": 0,
- "category": 0,
- "title": "string",
- "content": "string",
- "attachment_info": {
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "is_claimed": true,
- "giver_id": "string"
}, - "custom_data": "string",
- "is_read": true
}
], - "has_more": true,
- "next_offset": 0,
- "total_num": 0,
- "item_map": {
- "property1": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}, - "property2": {
- "item_id": "string",
- "display_name": "string",
- "icon": "string",
- "description": "string",
- "default_custom_data": {
- "property1": "string",
- "property2": "string"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "item_type": 0,
- "valid_duration": 0,
- "is_stackable": true,
- "is_consumable": true,
- "is_unique": true,
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "stack_limit": 0
}
}, - "currency_map": {
- "property1": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}, - "property2": {
- "currency_code": "string",
- "currency_type": 0,
- "currency_name": "string",
- "currency_icon": "string"
}
}, - "giver_map": {
- "property1": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "property2": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}
}
}
}
RecoverDeletedMails
Recover deleted mails for specified player.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
mail_ids | Array of strings Mail ID list to recover. |
receiver_id | string Recipient Player ID. |
Responses
Request samples
- Payload
{- "mail_ids": [
- "string"
], - "receiver_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
SendGlobalMail
Send global mail to all players.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
category | integer <uint32> Mail category, 0: Invalid value, 1: System mail, 2: Announcement mail, 3: Game event, 4: Item reward, 5: Player gift, 6: Custom |
object Mail multi-language text. | |
default_language | string Default language. |
object (AttachmentInfo) AttachmentInfo: Attachment information | |
custom_data | string Custom data. Optional. |
idempotent_id | string Idempotent ID. Optional. |
object Mail environment variables. Optional. | |
expiration_seconds | integer <uint64> Global mail expiration time in seconds. |
Responses
Request samples
- Payload
{- "category": 0,
- "text": {
- "property1": {
- "title": "string",
- "content": "string"
}, - "property2": {
- "title": "string",
- "content": "string"
}
}, - "default_language": "string",
- "attachment_info": {
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "is_claimed": true,
- "giver_id": "string"
}, - "custom_data": "string",
- "idempotent_id": "string",
- "env_vars": {
- "property1": "string",
- "property2": "string"
}, - "expiration_seconds": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mail_id": "string"
}
}
SendGlobalMailWithTemplate
Send global mail with template to all players.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
template_name | string Template name. |
object (AttachmentInfo) AttachmentInfo: Attachment information | |
idempotent_id | string Idempotent ID. Optional. |
object Mail environment variables. Optional. | |
expiration_seconds | integer <uint64> Global mail expiration time in seconds. |
Responses
Request samples
- Payload
{- "template_name": "string",
- "attachment_info": {
- "item_content": [
- {
- "item_id": "string",
- "amount": 0
}
], - "currency_content": [
- {
- "currency_code": "string",
- "amount": 0
}
], - "is_claimed": true,
- "giver_id": "string"
}, - "idempotent_id": "string",
- "env_vars": {
- "property1": "string",
- "property2": "string"
}, - "expiration_seconds": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "mail_id": "string"
}
}
RetractGlobalMail
Retract a previously sent global mail.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
mail_id | string Mail ID to retract. |
Responses
Request samples
- Payload
{- "mail_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
GetRankingList
Get leaderboard's ranking list by page.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
leaderboard_name | string The name of leaderboard to query. |
offset | integer <uint32> Query offset. |
count | integer <uint32> Query count of ranking items, maximum is 200. |
Responses
Request samples
- Payload
{- "leaderboard_name": "string",
- "offset": 0,
- "count": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "total_num": 0,
- "next_offset": 0,
- "items": [
- {
- "rank": 0,
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "updated_time": 0
}
]
}
}
GetRankItemPosInfo
Get rank position for specific key in leaderboard, also rank posiitons around the key.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
leaderboard_name | string The name of leaderboard to query. |
key | string The key to query in leaderboard. |
neighbor_cnt | integer <uint32> The count of leaderboard entries around the key. The result contains at most the 'neighbor_cnt' of entries before the key and 'neighbor_cnt' after the key, maximum is 10. |
Responses
Request samples
- Payload
{- "leaderboard_name": "string",
- "key": "string",
- "neighbor_cnt": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "item": {
- "rank": 0,
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "updated_time": 0
}, - "preceding_items": [
- {
- "rank": 0,
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "updated_time": 0
}
], - "subsequent_items": [
- {
- "rank": 0,
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "updated_time": 0
}
]
}
}
GetFriendsRankingList
Get leaderboard's friends ranking list.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
leaderboard_name | string |
player_id | string |
Responses
Request samples
- Payload
{- "leaderboard_name": "string",
- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "items": [
- {
- "rank": 0,
- "key": "string",
- "value": 0,
- "secondary_value": 0,
- "updated_time": 0
}
], - "friend_infos": {
- "property1": {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "player_presence": {
- "presence": "string",
- "status": 0
}, - "created_time": 0,
- "remark": "string"
}, - "property2": {
- "player_info": {
- "player_id": "string",
- "display_name": "string",
- "gender": "string",
- "avatar_uri": "string",
- "custom_info": {
- "property1": {
- "value": "string",
- "type": 0
}, - "property2": {
- "value": "string",
- "type": 0
}
}, - "account_platform": "string",
- "account_id": "string",
- "os": 0,
- "account_open_id": "string",
- "account_provider": 0
}, - "player_presence": {
- "presence": "string",
- "status": 0
}, - "created_time": 0,
- "remark": "string"
}
}
}
}
CreateECT
Create an Eventual Consistent Transaction (ECT) operation.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
id | string ECT ID. |
name | string ECT Name. |
payload | string Userdata of ECT set by game. |
player_ids | Array of strings All players associated with the operation in this ECT. |
object (ExpirationAndRetryPolicy) The ExpirationAndRetryPolicy structure defines the expiration time and retry strategy for operations. It specifies how long an operation should be considered valid and how many times and how frequently it should be retried in case of failure. | |
Array of objects (ECTActionCreateParams) Actions of ECT. |
Responses
Request samples
- Payload
{- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "actions": [
- {
- "name": "string",
- "payload": "string",
- "idempotency_token": "string"
}
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "status": 0,
- "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "created_time": 0,
- "updated_time": 0,
- "actions": [
- {
- "id": "string",
- "name": "string",
- "idempotency_token": "string",
- "payload": "string",
- "result": "string",
- "status": 0,
- "updated_time": 0
}
]
}
}
CancelECT
Cancel an ECT operation.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
id | string ECT ID. |
reason | string Reason for cancellation. |
Responses
Request samples
- Payload
{- "id": "string",
- "reason": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "status": 0,
- "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "created_time": 0,
- "updated_time": 0,
- "actions": [
- {
- "id": "string",
- "name": "string",
- "idempotency_token": "string",
- "payload": "string",
- "result": "string",
- "status": 0,
- "updated_time": 0
}
]
}
}
UpdateECT
Update actions and payload of a specified ECT.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
id | string ECT ID. |
payload | string Updated userdata of ECT set by game. |
object Update the results and status of actions. key: action ID. |
Responses
Request samples
- Payload
{- "id": "string",
- "payload": "string",
- "action_updates": {
- "property1": {
- "payload": "string",
- "result": "string",
- "status": 0
}, - "property2": {
- "payload": "string",
- "result": "string",
- "status": 0
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "status": 0,
- "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "created_time": 0,
- "updated_time": 0,
- "actions": [
- {
- "id": "string",
- "name": "string",
- "idempotency_token": "string",
- "payload": "string",
- "result": "string",
- "status": 0,
- "updated_time": 0
}
]
}
}
UpdateECTActions
Update actions of a specified ECT.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
id | string ECT ID. |
object Update the results and status of actions. key: action ID. |
Responses
Request samples
- Payload
{- "id": "string",
- "action_updates": {
- "property1": {
- "payload": "string",
- "result": "string",
- "status": 0
}, - "property2": {
- "payload": "string",
- "result": "string",
- "status": 0
}
}
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "status": 0,
- "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "created_time": 0,
- "updated_time": 0,
- "actions": [
- {
- "id": "string",
- "name": "string",
- "idempotency_token": "string",
- "payload": "string",
- "result": "string",
- "status": 0,
- "updated_time": 0
}
]
}
}
GetECTInfo
Retrieve information about a specified ECT.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
id | string ECT ID. |
Responses
Request samples
- Payload
{- "id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "status": 0,
- "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "created_time": 0,
- "updated_time": 0,
- "actions": [
- {
- "id": "string",
- "name": "string",
- "idempotency_token": "string",
- "payload": "string",
- "result": "string",
- "status": 0,
- "updated_time": 0
}
]
}
}
GetPlayerUncompletedECTs
Retrieve uncompleted ECTs for a specified player. Supports pagination.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player ID. |
offset | integer <uint32> Start position. |
count | integer <uint32> Limit of the ECTs request. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "offset": 0,
- "count": 0
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "ect_list": [
- {
- "id": "string",
- "name": "string",
- "payload": "string",
- "player_ids": [
- "string"
], - "status": 0,
- "expiration_and_retry_policy": {
- "expiration_duration": 0,
- "trigger_auto_retry_event": true,
- "max_auto_retry_count": 0,
- "auto_retry_interval": 0
}, - "created_time": 0,
- "updated_time": 0,
- "actions": [
- {
- "id": "string",
- "name": "string",
- "idempotency_token": "string",
- "payload": "string",
- "result": "string",
- "status": 0,
- "updated_time": 0
}
]
}
], - "next_offset": 0,
- "total_num": 0,
- "has_more": true
}
}
GetGameGlobalStat
Get the global stat of the game, such as current online player count, total registered player count, etc.
Request body is empty.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Responses
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "current_online_player": {
- "update_timestamp": "string",
- "value": 0
}, - "total_reg_player": {
- "update_timestamp": "string",
- "value": 0
}, - "today_new_reg_player": {
- "update_timestamp": "string",
- "value": 0
}, - "today_login_count": {
- "update_timestamp": "string",
- "value": 0
}
}
}
GetGameRecentStat
Get the recent stat of the game, such as recent registered player count, recent login count, etc.
Request body is empty.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Responses
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "recent_new_reg_player": 0,
- "recent_login_count": 0,
- "recent_logout_count": 0
}
}
GetPlayerStat
Get the stat of the specific player, such as total battle duration, total login count, etc.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string The player id. |
Responses
Request samples
- Payload
{- "player_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "total_online_duration_sec": 0,
- "total_battle_duration_sec": 0,
- "total_battle_count": 0,
- "total_login_count": 0,
- "latest_login_time": 0,
- "latest_logout_time": 0,
- "latest_login_ip": "string"
}
}
GetPlayerSessionStat
Get the stat of the specific player session, such as battle duration, battle count, etc.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
player_id | string Player id. |
player_session_id | string Player session id. |
Responses
Request samples
- Payload
{- "player_id": "string",
- "player_session_id": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "battle_duration_sec": 0,
- "battle_count": 0
}
}
PushMsgToDS
Push messages to the ds (no response back).
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle_session_id can not be empty. |
payload | string Payload len >= 0 and payload len <= 4096. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "payload": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
RpcRequestToDS
Send RPC request to ds.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
battle_session_id | string Battle_session_id can not be empty. |
payload | string Payload len >= 0 and payload len <= 4096. |
Responses
Request samples
- Payload
{- "battle_session_id": "string",
- "payload": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "payload": "string"
}
}
PushMsgToGameBackend
Push messages to the game-hosted backend (no response back), To ensure the stability of the communication pipeline, PGOS employs the RoutingKey field in the HTTP header for hash routing. If you aim to guarantee the stability of communication as much as possible, it is necessary for you to add the RoutingKey field to the HTTP header.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
payload | string Payload len >= 0 and payload len <= 4096. |
extra | string Extra len >= 0 and extra len <= 4096. |
tag | string Proxy tag. |
Responses
Request samples
- Payload
{- "payload": "string",
- "extra": "string",
- "tag": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
RpcRequestToGameBackend
Send RPC request to the game-hosted backendTo ensure the stability of the communication pipeline, PGOS employs the RoutingKey field in the HTTP header for hash routing. If you aim to guarantee the stability of communication as much as possible, it is necessary for you to add the RoutingKey field to the HTTP header.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
payload | string Payload len >= 0 and payload len <= 4096. |
extra | string Extra len >= 0 and extra len <= 4096. |
tag | string Proxy tag. |
Responses
Request samples
- Payload
{- "payload": "string",
- "extra": "string",
- "tag": "string"
}
Response samples
- 200
{- "result": 0,
- "msg": "string",
- "body": {
- "payload": "string"
}
}
PushMsg
Push message to players by virtual server or game backend service (such as DS).Calling this API will trigger the System::OnGameCustomMsg event on the game client, and you can add event observers through the PgosSDK.
header Parameters
TitleId | string Title id. |
TitleRegionId | string Title region id. |
SecretId | string Secret id. |
ServerTicket | string Server ticket. |
Request Body schema: application/json
msg_type | string Message type, custom by game. |
msg | string Message content, max message length is 10k. |
player_ids | Array of strings Online player IDs who will receive message, and the maximum limit is 200. |
Responses
Request samples
- Payload
{- "msg_type": "string",
- "msg": "string",
- "player_ids": [
- "string"
]
}
Response samples
- 200
{- "result": 0,
- "msg": "string"
}
InvokeVirtualServer
Invoke the virtual server. The URL contains three parts: prefix, virtual server name and the virtual server path. The prefix should be /virtualserver/invoke/. The virtual server name is the name of your virtual server. The virtual server path is decided by yourself based on your needs as long as the path is not in the reserved URI mentioned in the virtual server manual . For example, request the API with /virtualserver/invoke/vs-demo/abc/123 will trigger the /abc/123 in the virtual server named "vs-demo".
path Parameters
virtualServerName required | string The name of your virtual server. |
virtualServerPath | string Virtual server path, custom path set by developers. |
header Parameters
TitleId required | string Title id. |
TitleRegionId required | string Title region id. |
SecretId required | string Secret id. |
ServerTicket required | string Server ticket. |
Request Body schema: */*
any content passed by game