Lobby - Update Lobby As Server

Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect behavior.

POST https://titleId.playfabapi.com/Lobby/UpdateLobbyAsServer

Request Header

Name Required Type Description
X-EntityToken True

string

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Request Body

Name Required Type Description
LobbyId True

string

The id of the lobby.

CustomTags

object

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

ServerData

object

The private key-value pairs which are visible to all entities in the lobby and modifiable by the joined server. Optional. Sets or updates key-value pairs on the lobby. Only the current lobby lobby server can set serverData. Keys may be an arbitrary string of at most 30 characters. The total size of all serverData values may not exceed 4096 bytes. Values are not individually limited. There can be up to 30 key-value pairs stored here. Keys are case sensitive.

ServerDataToDelete

string[]

The keys to delete from the lobby serverData. Optional. Optional. Deletes key-value pairs on the lobby. Only the current joined lobby server can delete serverData. All the specified keys will be removed from the serverData. Keys that do not exist in the lobby are a no-op. If the key to delete exists in the serverData (same request) it will result in a bad request.

ServerEntity

EntityKey

The lobby server. Optional. Set a different server as the joined server of the lobby (there can only be 1 joined server). When changing the server the previous server will automatically be unsubscribed.

Responses

Name Type Description
200 OK

LobbyEmptyResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

LobbyEmptyResult
UpdateLobbyAsServerRequest

Preview: Request to update the serverData and serverEntity in case of migration. Only a game_server entity can update this information and this is restricted to client owned lobbies which are using connections.

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

Name Type Description
Id

string

Unique ID of the entity.

Type

string

Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types

LobbyEmptyResult

UpdateLobbyAsServerRequest

Preview: Request to update the serverData and serverEntity in case of migration. Only a game_server entity can update this information and this is restricted to client owned lobbies which are using connections.

Name Type Description
CustomTags

object

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

LobbyId

string

The id of the lobby.

ServerData

object

The private key-value pairs which are visible to all entities in the lobby and modifiable by the joined server. Optional. Sets or updates key-value pairs on the lobby. Only the current lobby lobby server can set serverData. Keys may be an arbitrary string of at most 30 characters. The total size of all serverData values may not exceed 4096 bytes. Values are not individually limited. There can be up to 30 key-value pairs stored here. Keys are case sensitive.

ServerDataToDelete

string[]

The keys to delete from the lobby serverData. Optional. Optional. Deletes key-value pairs on the lobby. Only the current joined lobby server can delete serverData. All the specified keys will be removed from the serverData. Keys that do not exist in the lobby are a no-op. If the key to delete exists in the serverData (same request) it will result in a bad request.

ServerEntity

EntityKey

The lobby server. Optional. Set a different server as the joined server of the lobby (there can only be 1 joined server). When changing the server the previous server will automatically be unsubscribed.

Error Codes

Name Code
LobbyBadRequest 13007
LobbyDoesNotExist 13000
LobbyRateLimitExceeded 13001
LobbyServerMismatch 13012
LobbyServerNotFound 13013