Manage creature configurations. A creature’s JSON definition file is the source of truth — the database is a cache. Universe assignment is runtime-only state.
GET /api/v1/creature — List all creatures known to the server.
GET /api/v1/creature/{creatureId} — Get a single creature by its UUID.
GET /api/v1/creature/{creatureId}/export — Export the creature’s raw configuration exactly as stored in the database, with Mongo’s internal _id stripped. Built for disaster recovery: when a controller’s Pi dies, pull the config back out, save it onto the replacement’s JSON file, or re-POST it to /api/v1/creature. Returns application/json.
POST /api/v1/creature — Upsert a creature’s configuration. Accepts a raw creature JSON config string. Returns the creature DTO, or 400 if the config is invalid.
POST /api/v1/creature/validate — Validate a creature configuration without saving it. Useful for checking a config before deploying it to a controller.
POST /api/v1/creature/register — Register a creature controller with a specific universe. This is how a controller announces itself to the server on startup.
{
"creature_config": "<raw creature JSON string>",
"universe": 1
}
PATCH /api/v1/creature/{creatureId}/idle — Enable or disable the idle animation loop for a creature. Returns 409 if the creature isn’t registered to a universe.
{
"enabled": true
}