Players
Players API
The Players API provides endpoints to retrieve player information and manage player data in your PoloCloud instance.
Manage players and retrieve player information via REST API
Get Player
Retrieve detailed information about a specific player by name.
Endpoint: GET /polocloud/api/v3/player/{playerName}
Parameters:
playerName(path) - The name of the player to retrieve
Response:
{
"status": 200,
"data": {
"name": "jakubxyz",
"uniqueId": "3af355d8-712e-4cb2-b622-fb0ee4c6ade0",
"currentServiceName": "lobby-1"
}
}Error Responses:
400- Player name cannot be null or empty404- Player not found
List Players
Retrieve a paginated list of all players with optional pagination parameters.
Endpoint: GET /polocloud/api/v3/players/list
Query Parameters:
page(optional) - Page number (default: 1, minimum: 1)size(optional) - Items per page (default: 20, range: 1-100)
Response:
{
"page": 1,
"size": 20,
"total": 1,
"totalPages": 1,
"data": [
{
"name": "jakubxyz",
"uuid": "3af355d8-712e-4cb2-b622-fb0ee4c6ade0",
"currentServiceName": "lobby-1"
}
]
}Error Responses:
400- Invalid pagination parameters
Player Model
| Field | Type | Description |
|---|---|---|
name | string | Player's display name |
uniqueId | string | Player's unique identifier (in single player response) |
uuid | string | Player's unique identifier (in list response) |
currentServiceName | string | Name of the service the player is currently on |
Usage Examples
Get Player Information
curl -X GET "http://localhost:8080/polocloud/api/v3/player/jakubxyz" \
-H "Cookie: token=YOUR_TOKEN_HERE"List Players with Pagination
curl -X GET "http://localhost:8080/polocloud/api/v3/players/list?page=1&size=10" \
-H "Cookie: token=YOUR_TOKEN_HERE"List All Players (First Page)
curl -X GET "http://localhost:8080/polocloud/api/v3/players/list" \
-H "Cookie: token=YOUR_TOKEN_HERE"