Eranio
Color theme

Deaths

Base: /api/deaths

The deaths endpoint shows who died most recently. You can use it to keep a death list on a website or in Discord, to spot many deaths in a short time, or to show in a panel how dangerous the server currently is. The mod records every player death itself as long as it is running. It does not know about deaths from the time when the mod was not loaded.

Handler: DeathTrackerHandler
GET /api/deaths

List deaths

Returns deathCount, the number of all deaths recorded so far, and recentDeaths, the last up to 10 entries with time, player and cause. The entries are in the order of recording, the oldest of the ten first.

Response Example

{
  "deathCount": 42,
  "recentDeaths": [
    {
      "time": "2026-01-01T00:00:00",
      "player": "Steve",
      "cause": "fall"
    }
  ]
}

cURL

curl -X GET 'http://localhost:5550/api/deaths' \
  -H 'X-Admin-Token: YOUR_TOKEN'
time is the server time in the format yyyy-MM-dd HH:mm:ss. cause is not the name of a cause of death but the amount of the fatal damage, for example 12.0 dmg. If this information is missing, it says unknown. So you cannot evaluate causes such as falling or enemies with this endpoint. Because the file is written as comma-separated lines, player names should not contain a comma. There are no filters and no paging, you always get only the last 10, while deathCount counts all lines of the file. If there is no death yet, you get deathCount 0 and an empty list. The mod does not shorten the file itself. For a death list on a website, poll the endpoint every few seconds up to minutes and compare deathCount with the last value. If it rises, new deaths have been added and you fetch them from recentDeaths. If more than 10 players die between two polls, the older ones drop out of the list, so poll more often in that case.

Internal Behavior

Reads the file Events/player_deaths.log in the data folder of the mod (mods/Eranio_HytaleAdminAPI). The death tracker of the mod hooks into the death component of Hytale and writes a line with time, name and damage for every player death. The file is read completely on every request, so with very many deaths the call gets slower.