Version: 1.1.0
Category: webapp
Entity: Struct
Base URL: ${webappBaseUrl} (default: http://localhost:8080)
Last Updated: January 1, 2026
| Method | Path | Description | Auth Required |
|---|---|---|---|
| GET | /api/struct/player/{player_id} |
Get structs by player ID | No |
| GET | /api/struct/planet/{planet_id} |
Get structs on planet | No |
| GET | /api/struct/type |
Get struct types | No |
| GET | /api/struct/{struct_id} |
Get struct by ID | No |
/api/struct/player/{player_id}Get structs by player ID.
webapp-struct-by-playerschemas/entities.md#Structapplication/json| Name | Type | Required | Format | Description |
|---|---|---|---|---|
player_id |
string | Yes | player-id | Player identifier |
Request: GET http://localhost:8080/api/struct/player/1-11
Response:
[
{
"id": "5-1",
"structTypeId": 14,
"owner": "1-11",
"locationId": "2-1",
"health": 100
}
]
/api/struct/planet/{planet_id}Get structs on planet.
webapp-struct-by-planetschemas/entities.md#Structapplication/json| Name | Type | Required | Format | Description |
|---|---|---|---|---|
planet_id |
string | Yes | planet-id | Planet identifier |
Request: GET http://localhost:8080/api/struct/planet/2-1
Response:
[
{
"id": "5-1",
"structTypeId": 14,
"owner": "1-11",
"locationId": "2-1",
"health": 100
}
]
/api/struct/typeGet struct types.
webapp-struct-typeschemas/entities.md#StructTypeapplication/jsonRequest: GET http://localhost:8080/api/struct/type
Response:
[
{
"id": 14,
"name": "Command Ship",
"cheatsheet_details": "...",
"cheatsheet_extended_details": "..."
}
]
/api/struct/{struct_id}Get struct by ID.
webapp-struct-by-idschemas/entities.md#Structapplication/json| Name | Type | Required | Format | Description |
|---|---|---|---|---|
struct_id |
string | Yes | struct-id | Struct identifier |
Request: GET http://localhost:8080/api/struct/5-1
Response:
{
"id": "5-1",
"structTypeId": 14,
"owner": "1-11",
"locationId": "2-1",
"health": 100
}
Destroyed structs are filtered out of responses. The is_destroyed field is used in queries (WHERE s.is_destroyed = false) but destroyed structs are not returned to clients.
{
"id": "5-1",
"structTypeId": 14,
"owner": "1-11",
"locationId": "2-1",
"health": 100,
"is_building": false
}
Struct type responses include cheatsheet fields (verified via SELECT * FROM struct_type):
{
"id": 14,
"name": "Command Ship",
"cheatsheet_details": "...",
"cheatsheet_extended_details": "...",
...
}
See: reviews/webapp-review-findings.md for code review verification
Last Updated: January 1, 2026