This repository was archived by the owner on Jul 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
GET Endpoints
Vianney Veremme edited this page Nov 12, 2024
·
1 revision
-
Get server time
-
Endpoint:
/,/time - Description: Retrieve the server time.
-
Endpoint:
-
Get all players
-
Endpoint:
/players -
Description: Retrieve a list of all players and their general details (e.g.,
id,name,email,gold,created_at,last_login).
-
Endpoint:
-
Get player by ID
-
Endpoint:
/players/{player_id} -
Description: Retrieve details of a specific player by
id.
-
Endpoint:
-
Get player by email
-
Endpoint:
/players/email/{email} -
Description: Retrieve a specific player by their unique
email(indexed for quick lookup).
-
Endpoint:
-
Get worlds of a player
-
Endpoint:
/players/{player_id}/worlds -
Description: Retrieve all worlds a player has joined by looking up entries in
player_world.
-
Endpoint:
-
Get cities owned by a player
-
Endpoint:
/players/{player_id}/cities -
Description: Retrieve all cities owned by a player by using
owner_idincity.
-
Endpoint:
-
Get all worlds
-
Endpoint:
/worlds -
Description: Retrieve a list of all worlds and their configurations (e.g.,
id,name,description,seed,action_speed, etc.).
-
Endpoint:
-
Get world by ID
-
Endpoint:
/worlds/{world_id} -
Description: Retrieve details of a specific world by
id.
-
Endpoint:
-
Get active worlds
-
Endpoint:
/worlds/active -
Description: Retrieve all worlds where
STATUSis 1 (active).
-
Endpoint:
-
Get players in a world
-
Endpoint:
/worlds/{world_id}/players -
Description: Retrieve all players associated with a given world using
player_world.
-
Endpoint:
-
Get islands in a world
-
Endpoint:
/worlds/{world_id}/islands - Description: Retrieve all islands within a specific world.
-
Endpoint:
-
Get all islands
-
Endpoint:
/islands - Description: Retrieve a list of all islands with their positions and associated world.
-
Endpoint:
-
Get island by ID
-
Endpoint:
/islands/{island_id} -
Description: Retrieve details of a specific island by
id.
-
Endpoint:
-
Get cities on an island
-
Endpoint:
/islands/{island_id}/cities - Description: Retrieve all cities located on a specific island.
-
Endpoint:
-
Get all cities
-
Endpoint:
/cities - Description: Retrieve a list of all cities, including coordinates, owner, and island details.
-
Endpoint:
-
Get city by ID
-
Endpoint:
/cities/{city_id} -
Description: Retrieve details of a specific city by
id.
-
Endpoint:
-
Get cities in a world
-
Endpoint:
/worlds/{world_id}/cities -
Description: Retrieve all cities within a specified world (through
island→cityrelationships).
-
Endpoint:
-
Get all buildings
-
Endpoint:
/buildings - Description: Retrieve a list of all buildings with names, levels, and city associations.
-
Endpoint:
-
Get buildings in a city
-
Endpoint:
/cities/{city_id}/buildings - Description: Retrieve all buildings in a specific city.
-
Endpoint:
-
Get building by ID
-
Endpoint:
/buildings/{building_id} -
Description: Retrieve details of a specific building by
id.
-
Endpoint:
-
Get building prerequisites
-
Endpoint:
/buildings/{building_id}/prerequisites -
Description: Retrieve all prerequisite buildings for a specified building by
building_prerequisite.
-
Endpoint:
-
Get all units
-
Endpoint:
/units -
Description: Retrieve a list of all units with their attributes (e.g.,
name,description,type,training_time,damage, etc.).
-
Endpoint:
-
Get units in a city
-
Endpoint:
/cities/{city_id}/units -
Description: Retrieve all units stationed in a city and their quantities using
city_unit.
-
Endpoint:
-
Get unit by ID
-
Endpoint:
/units/{unit_id} -
Description: Retrieve details of a specific unit by
id.
-
Endpoint:
-
Get all battles
-
Endpoint:
/battles - Description: Retrieve a list of all battles with attacker and defender details, time, winner, loser, and loot.
-
Endpoint:
-
Get battle by ID
-
Endpoint:
/battles/{battle_id} -
Description: Retrieve details of a specific battle by
id.
-
Endpoint:
-
Get battles of a player
-
Endpoint:
/players/{player_id}/battles - Description: Retrieve all battles involving a specified player as either attacker or defender.
-
Endpoint:
-
Get units in a battle
-
Endpoint:
/battles/{battle_id}/units - Description: Retrieve all units involved in a specific battle, including their quantities and which side they fought on.
-
Endpoint:
-
Get building requirements
-
Endpoint:
/buildings/{building_id}/requirements -
Description: Retrieve the resources required to build or upgrade a specific building based on
building_requirement.
-
Endpoint: