Eranio
Color theme

Memories

Base: /api/memories

Memories are the collection system of Hytale in which the server records encounters with NPCs. This endpoint shows which memories exist on the server and which of them have already been discovered. It suits a progress page, a Discord command for the collection status or an overview in the panel. Discoveries apply to the whole server and not per player. The response is large because it contains images and translations.

Handler: MemoriesHandler
GET /api/memories

List memories

Returns totalAll and totalDiscovered as well as categories, an object per category with total, discovered, the list memories and, if present, categoryIconBase64. Every memory has id, title, discovered and, when known, displayName (English name), npcRole, capturedTimestamp, zoneKey, locationKey, displayLocation and iconBase64. In addition, translations contains names for NPCs, map regions and categories in 13 languages. Memories apply server-wide.

Response Example

{
  "totalAll": 120,
  "totalDiscovered": 45,
  "categories": {
    "Wildlife": {
      "total": 20,
      "discovered": 10,
      "memories": [
        {
          "id": "wolf",
          "title": "server.npcRoles.wolf.name",
          "discovered": true,
          "npcRole": "wolf",
          "iconBase64": "<base64>"
        }
      ],
      "categoryIconBase64": "<base64>"
    }
  },
  "translations": {
    "en-US": {
      "npc_roles": {
        "wolf": "Wolf"
      },
      "map_regions": {},
      "memory_categories": {
        "Wildlife": "Wildlife"
      }
    }
  }
}

cURL

curl -X GET 'http://localhost:5550/api/memories' \
  -H 'X-Admin-Token: YOUR_TOKEN'
Within each category, discovered memories come first, then sorted by id. The response contains images as base64 and translations and is clearly larger than that of most other endpoints, so do not poll it every second. If the memories plugin of the server is not loaded, the endpoint does not answer with an error code but with 200 and {"error": "Could not build memories data"}. So check the field error. Methods other than GET give 404. There are no parameters and no filters.

Internal Behavior

Reads the memories plugin of Hytale with all possible and the recorded memories. Images are loaded from the asset packs and cached, and names are resolved through the translation module of the server. In addition, the mod rebuilds the same content 15 seconds after the start and every five minutes afterwards and writes it as memories.json into its data folder when it changes. The request itself rebuilds the data fresh on every call.