Lobby - Find Lobbies
Find all the lobbies that match certain criteria.
POST https://titleId.playfabapi.com/Lobby/FindLobbies
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 | Type | Description |
---|---|---|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
Filter |
string |
OData style string that contains one or more filters. Only the following operators are supported: "and" (logical and), "eq" (equal), "ne" (not equals), "ge" (greater than or equal), "gt" (greater than), "le" (less than or equal), and "lt" (less than). The left-hand side of each OData logical expression should be either a search property key (e.g. string_key1, number_key3, etc) or one of the pre-defined search keys all of which must be prefixed by "lobby/": lobby/memberCount (number of players in a lobby), lobby/maxMemberCount (maximum number of players allowed in a lobby), lobby/memberCountRemaining (remaining number of players who can be allowed in a lobby), lobby/membershipLock (must equal 'Unlocked' or 'Locked'), lobby/amOwner (required to equal "true"), lobby/amMember (required to equal "true"). |
OrderBy |
string |
OData style string that contains sorting for this query in either ascending ("asc") or descending ("desc") order. OrderBy clauses are of the form "number_key1 asc" or the pre-defined search key "lobby/memberCount asc", "lobby/memberCountRemaining desc" and "lobby/maxMemberCount desc". To sort by closest, a moniker |
Pagination |
Request pagination information. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
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 |
---|---|
Api |
The basic wrapper around every failed API response |
Entity |
Combined entity type and ID structure which uniquely identifies a single entity. |
Find |
Request to find lobbies. |
Find |
|
Lobby |
|
Membership |
|
Pagination |
|
Pagination |
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 |
FindLobbiesRequest
Request to find lobbies.
Name | Type | Description |
---|---|---|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
Filter |
string |
OData style string that contains one or more filters. Only the following operators are supported: "and" (logical and), "eq" (equal), "ne" (not equals), "ge" (greater than or equal), "gt" (greater than), "le" (less than or equal), and "lt" (less than). The left-hand side of each OData logical expression should be either a search property key (e.g. string_key1, number_key3, etc) or one of the pre-defined search keys all of which must be prefixed by "lobby/": lobby/memberCount (number of players in a lobby), lobby/maxMemberCount (maximum number of players allowed in a lobby), lobby/memberCountRemaining (remaining number of players who can be allowed in a lobby), lobby/membershipLock (must equal 'Unlocked' or 'Locked'), lobby/amOwner (required to equal "true"), lobby/amMember (required to equal "true"). |
OrderBy |
string |
OData style string that contains sorting for this query in either ascending ("asc") or descending ("desc") order. OrderBy clauses are of the form "number_key1 asc" or the pre-defined search key "lobby/memberCount asc", "lobby/memberCountRemaining desc" and "lobby/maxMemberCount desc". To sort by closest, a moniker |
Pagination |
Request pagination information. |
FindLobbiesResult
Name | Type | Description |
---|---|---|
Lobbies |
Array of lobbies found that matched FindLobbies request. |
|
Pagination |
Pagination response for FindLobbies request. |
LobbySummary
Name | Type | Description |
---|---|---|
ConnectionString |
string |
A string used to join the lobby.This field is populated by the Lobby service.Invites are performed by communicating this connectionString to other players. |
CurrentPlayers |
number |
The current number of players in the lobby. |
LobbyId |
string |
Id to uniquely identify a lobby. |
MaxPlayers |
number |
The maximum number of players allowed in the lobby. |
MembershipLock |
A setting indicating whether members are allowed to join this lobby. When Locked new members are prevented from joining. |
|
Owner |
The client or server entity which owns this lobby. |
|
SearchData |
object |
Search data. |
MembershipLock
Name | Type | Description |
---|---|---|
Locked |
string |
|
Unlocked |
string |
PaginationRequest
Name | Type | Description |
---|---|---|
ContinuationToken |
string |
Continuation token returned as a result in a previous FindLobbies call. Cannot be specified by clients. |
PageSizeRequested |
number |
The number of lobbies that should be retrieved. Cannot be specified by servers, clients may specify any value up to 50 |
PaginationResponse
Name | Type | Description |
---|---|---|
ContinuationToken |
string |
Continuation token returned by server call. Not returned for clients |
TotalMatchedLobbyCount |
number |
The number of lobbies that matched the search request. |
Error Codes
Name | Code |
---|---|
LobbyBadRequest | 13007 |
LobbyRateLimitExceeded | 13001 |