Skip to main content
POST
/
item
/
define
register a new item definition
curl --request POST \
  --url http://localhost:3917/item/define \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 1,
  "name": "Health Potion",
  "properties": {
    "cost": 50,
    "heal": 150
  }
}
'
{
  "ok": true,
  "message": "<string>"
}

Body

application/json

Item definition: numeric id, name, and a properties map of named numeric attributes (e.g. cost, damage).

The body is of type any.

Response

200 - application/json

Item definition registered in the ItemRegistry.

ok
boolean
required
message
string | null