Eranio
Color theme

Items

Base: /api/items

The item catalog describes every item the running server knows, including items from mods. You need it for selection lists, for example when giving items, for a shop, for a wiki page or to look up IDs for the give-item endpoint. The list can be filtered by text and type. Because every item delivers its image as base64, the unfiltered response is large.

Handler: ItemsHandler
GET /api/items

List items

Returns all items of the running server (Hytale 0.7.2: 4008). Per item: id, name (English display name), translationKey, icon (image as base64), type, maxStack, maxDurability, durabilityLossOnHit, itemLevel, qualityIndex, fuelQuality, scale, consumable, dropsOnDeath and, if the item is a block, blockId.

Parameters

Name Type Required Description
q string No Search in ID and name (case-insensitive)
type string No Comma-separated types: weapon, armor, tool, glider, utility, consumable, block, misc

Response Example

[
  {
    "id": "hytale:sword_iron",
    "name": "Iron Sword",
    "translationKey": "sword_iron",
    "icon": "<base64>",
    "maxStack": 1,
    "maxDurability": 100,
    "itemLevel": 1,
    "consumable": false,
    "dropsOnDeath": true,
    "categories": [
      "weapon"
    ],
    "type": "weapon"
  }
]

cURL

curl -X GET 'http://localhost:5550/api/items?q=sword&type=weapon' \
  -H 'X-Admin-Token: YOUR_TOKEN'
type is one of the groups weapon, armor, tool, glider, utility, consumable, block or misc, which the mod derives from the properties of the item, it is not a category of Hytale. Separate several types with a comma. q searches id and name without regard to case. Without a filter the response is very large because every item carries its image. So filter whenever possible, or load the list once and store it. The mod also creates a file items.json in its data folder 10 seconds after the start. Methods other than GET give 405.

Internal Behavior

Iterates the live item asset map; icons are cached as base64.
GET /api/items/search

Search items

Behaves exactly like the list and accepts the same parameters q and type. Both paths, /api/items and /api/items/search, return the same, the search path only makes your calls easier to read.

Parameters

Name Type Required Description
q string No Search term
type string No Type filter as above

Response Example

[
  {
    "id": "hytale:sword_iron",
    "name": "Iron Sword",
    "type": "weapon"
  }
]

cURL

curl -X GET 'http://localhost:5550/api/items/search?q=sword&type=weapon' \
  -H 'X-Admin-Token: YOUR_TOKEN'

Internal Behavior

Uses the same code path as /api/items.