Category: webapp
Entity: Player
Base URL: ${webappBaseUrl} (default: http://localhost:8080, public guild webapp: http://crew.oh.energy)
Last Updated: May 29, 2026
| Method | Path | Description | Auth Required |
|---|---|---|---|
| GET | /api/player/{player_id} |
Get player information from web application | Yes |
| GET | /api/player/{player_id}/action/last/block/height |
Get last action block height for player | Yes |
| GET | /api/player/raid/search |
Search player raids | Yes |
| GET | /api/player/transfer/search |
Search player transfers | Yes |
| GET | /api/player/{player_id}/ore/stats |
Get player ore statistics | Yes |
| GET | /api/player/{player_id}/planet/completed |
Get completed planets for player | Yes |
| GET | /api/player/{player_id}/raid/launched |
Get launched raids for player | Yes |
| GET | /api/player/list/all/page/{page} |
Catalog list of all players, paginated | Yes |
| GET | /api/player/list/guild/{guild_id}/page/{page} |
Catalog list of players in a guild | Yes |
| GET | /api/player/list/substation/{substation_id}/page/{page} |
Catalog list of players connected to a substation | Yes |
/api/player/{player_id}Get player information from web application.
webapp-player-by-idschemas/responses.md#WebappPlayerResponseapplication/json| Name | Type | Required | Format | Description |
|---|---|---|---|---|
player_id |
string | Yes | entity-id (pattern: ^1-[0-9]+$) |
Player identifier in format ‘type-index’ (e.g., ‘1-11’ for player type 1, index 11). Type 1 = Player. |
Request: GET http://localhost:8080/api/player/1-11
Response — envelope; data is a single flat object whose keys are the SQL columns from PlayerManager::getPlayer (snake_case), not nested {player, guild, stats}. Representative shape (column set may grow):
{
"success": true,
"errors": {},
"data": {
"id": "1-11",
"primary_address": "structs1...",
"guild_id": "0-1",
"guild_name": "GuildName",
"tag": "GLD",
"substation_id": "4-1",
"planet_id": "2-1",
"fleet_id": "9-11",
"fleet": { "...": "row_to_json of the fleet" },
"username": "PlayerName",
"pfp": "...",
"alpha": "1000000",
"ore": "1000",
"load": "5"
}
}
Guild fields are type 0 (0-1). Always unwrap data after checking success; treat keys as SQL column names.
/api/player/{player_id}/action/last/block/heightGet last action block height for player.
webapp-player-action-last-blockschemas/responses.md#BlockHeightResponseapplication/json| Name | Type | Required | Format | Description |
|---|---|---|---|---|
player_id |
string | Yes | player-id | Player identifier |
Request: GET http://localhost:8080/api/player/1-11/action/last/block/height
Response (envelope):
{
"success": true,
"errors": {},
"data": { "height": 12345 }
}
/api/player/raid/searchSearch player raids.
webapp-player-raid-searchUsername and PFP are chain UGC fields on structs.player (username, pfp columns). They are set at signup via MsgGuildMembershipJoinProxy.playerName / playerPfp, or updated later via MsgPlayerUpdateName / MsgPlayerUpdatePfp. The webapp queues these through queueMsgPlayerUpdateName(playerId, name) and queueMsgPlayerUpdatePfp(playerId, pfp).
The HTTP PUT /api/player/username endpoint no longer exists — all identity updates go through chain transactions.
See knowledge/mechanics/ugc-moderation.md for the full UGC update flow and validation rules.
/api/player/transfer/searchSearch player transfers.
webapp-player-transfer-search/api/player/{player_id}/ore/statsGet player ore statistics.
webapp-player-ore-statsschemas/responses.md#OreStatsResponseapplication/json| Name | Type | Required | Format | Description |
|---|---|---|---|---|
player_id |
string | Yes | player-id | Player identifier |
Request: GET http://localhost:8080/api/player/1-11/ore/stats
Response:
{
"player_id": "1-11",
"total_ore": 1000,
"ore_by_type": {
"iron": 500,
"copper": 300,
"silver": 200
}
}
/api/player/{player_id}/planet/completedGet completed planets for player.
webapp-player-planet-completed| Name | Type | Required | Format | Description |
|---|---|---|---|---|
player_id |
string | Yes | player-id | Player identifier |
/api/player/{player_id}/raid/launchedGet launched raids for player.
webapp-player-raid-launched| Name | Type | Required | Format | Description |
|---|---|---|---|---|
player_id |
string | Yes | player-id | Player identifier |
/api/player/list/all/page/{page}Catalog list of every player on the chain, paginated.
webapp-player-list-all| Name | Type | Required | Format | Description |
|---|---|---|---|---|
page |
integer | Yes | \d+ |
Page number, 1-indexed |
/api/player/list/guild/{guild_id}/page/{page}Catalog list of players in a guild.
webapp-player-list-by-guild| Name | Type | Required | Format | Description |
|---|---|---|---|---|
guild_id |
string | Yes | guild-id | Guild identifier (e.g. 0-1) |
page |
integer | Yes | \d+ |
Page number |
/api/player/list/substation/{substation_id}/page/{page}Catalog list of players connected to a substation.
webapp-player-list-by-substation| Name | Type | Required | Format | Description |
|---|---|---|---|---|
substation_id |
string | Yes | substation-id | Substation identifier (e.g. 4-1) |
page |
integer | Yes | \d+ |
Page number |
Player responses include reactor staking summary:
{
"player": {
"id": "1-11",
"username": "PlayerName",
...
},
"reactorStaking": {
"totalStaked": "...",
"delegationStatus": "active",
"reactors": [...]
},
...
}
The /api/player/list/... endpoints return the shared envelope with rows directly in data as a flat array (fixed page size 100 — if data.length === 100, fetch the next page). Bespoke /api/player/{player_id} endpoints also use the { "success", "errors", "data" } envelope; their data holds the SQL column names from the backing query (snake_case). See protocols/webapp-api-protocol.md.