Skip to main content
POST
/
hero
/
define
register a hero definition in the HeroRegistry
curl --request POST \
  --url http://localhost:3917/hero/define \
  --header 'Content-Type: application/json' \
  --data '
{
  "base_stats": {
    "attack_damage": 55,
    "max_health": 600
  },
  "damage": 55,
  "gold": 625,
  "health": 600,
  "mana": 300,
  "name": "Juggernaut",
  "range": 1.5,
  "stat_growth": {
    "attack_damage": 3,
    "max_health": 80
  }
}
'
{
  "ok": true,
  "message": "<string>"
}

Body

application/json

Hero definition: name, starting health (600), mana (300), gold (625), damage (50), range (1.5), plus base_stats and stat_growth maps. Optional abilities define Q/W/E/R slots. Re-registering an existing name overwrites it.

The body is of type any.

Response

200 - application/json

Hero registered in the HeroRegistry.

ok
boolean
required
message
string | null