Containers
Storage containers on your server, their owners, inventory, and type counts.
Every storage container on your server — the paginated list, a single container by its entity id, its inventory, and a breakdown of how many of each type exist.
Identifying a container
The detail and inventory endpoints take a numeric {id} path segment — the container's entity
id. It must be a positive integer with no leading zeros (pattern ^[1-9]\d*$); values such
as 0 and 007 are rejected with 400 validation_error.
GET /v1/containers
GET /v1/containers/5
GET /v1/containers/5/inventory
GET /v1/containers/typesAuthorization
| Scope | Grants |
|---|---|
containers:read | Every container endpoint — list, detail, inventory, type counts. |
Each container owner carries a discord_id (null when that owner isn't linked to Discord). A
key missing the scope gets 403 insufficient_scope.
GET /v1/containers
The container list, paginated. Optional filters:
| Query | Meaning |
|---|---|
owner_steam_id | Containers owned by this Steam64 (digits only). A whole Steam64 is that account; a part of one matches every Steam64 holding it. |
owner_discord_id | Containers owned by the player linked to this Discord id: a whole one, 17-20 digits. Resolves at request time; an unlinked id, or a shorter one, matches nothing (empty page, never a 404). |
owner_name | A part of the owner's name, in any case (Cyrillic too), matched against both his character name and his Steam name (mod 2.0.68+). |
flag_id | Containers under this flag, the one whose zone holds them (digits only). Needs mod 2.0.68: an older mod answers 400 validation_error. |
is_locked | true or false. |
is_buried | true or false. |
search | Free-text search. Combines with the structured filters above and narrows their result (mod 2.0.68+). |
limit | Page size, 10–100 (default 50). |
cursor | Opaque cursor from a previous response's next_cursor. |
Supplying both owner_steam_id and owner_discord_id is a 400 validation_error.
{
"data": [
{
"entity_id": "5", "class_name": "Crate", "display_name": "Crate", "custom_name": "Loot",
"owner": { "profile_id": 7, "name": "Bob", "steam_id": "76561198000000000", "discord_id": "123456789012345678" },
"flag_id": 5,
"position": { "x": 1, "y": 2, "z": 3 },
"is_locked": true, "lock_type": "DialLock_Item", "lock_hp": 0.5, "is_buried": false,
"last_access_time": "2023-11-14T22:13:20.000Z", "item_count": 4
}
],
"has_more": false,
"next_cursor": null,
"total": 1
}Field notes
owner is the nested identity object { profile_id, name, steam_id, discord_id }. lock_hp and
every position axis are fractional numbers. last_access_time is ISO-8601 (or null).
item_count is null when the mod didn't report it. flag_id is the flag whose zone holds the
container, 0 when none does, and null when the server runs a mod older than 2.0.68, which
doesn't tell.
GET /v1/containers/{id}
A single container by its entity id. Returns the same object as one list row. 404 not_found
when no container carries that entity id.
GET /v1/containers/{id}/inventory
The container's full, nested inventory. Each item may carry contents (recursively). A subtree
the mod stopped expanding at its depth cap is flagged contents_truncated: true.
From mod 2.0.68 the whole tree comes back, up to 10 levels deep: a rifle in a backpack brings its magazine and
sight, a backpack in a chest its own things. is_weapon and is_container mean the same at every level: a rifle
in a backpack is is_weapon: true, anything holding things is is_container: true. Before 2.0.68 one level came
back under each item, and nested items always had both flags false.
is_weapon is what the game itself keeps as a weapon: a bow is one; a holster, gunpowder and a cleaning kit are
not (before 2.0.68, anything named like a gun was). What the save leaves out because it never changed comes as
new: a thing never damaged has health 100 (its max_health where it has one), not 0, and an untouched box of
rounds weighs its rounds too. weight is in grams.
{
"items": [
{
"id": 7, "class": "Rifle", "name": "Rifle", "icon": "…",
"health": 90, "max_health": 100, "weight": 3000, "is_container": true, "is_weapon": true,
"contents_truncated": false,
"contents": [ { "id": 8, "class": "Mag", "name": "Mag", "icon": "…", "contents": [], "contents_truncated": false, "health": 1, "max_health": 1, "weight": 200, "is_container": false, "is_weapon": false } ]
}
],
"total": 1
}GET /v1/containers/types
A read-only aggregation of how many containers of each display name exist. This is a summary,
not a filter source — the numbers are keyed by human-readable names, not the raw class_name
you'd pass to a filter.
{ "types": { "Crate": 5, "Wooden Locker": 2 } }Caching
Every container read sends an ETag and Cache-Control: private with a short max-age (10–15 s);
send the ETag back as If-None-Match to get a 304 Not Modified.
Errors
Standard error envelope. The ones you're most likely to hit:
| Code | Status | When |
|---|---|---|
insufficient_scope | 403 | The key lacks containers:read. |
not_found | 404 | No container matches the {id}. |
validation_error | 400 | An {id} that isn't a positive integer without leading zeros (^[1-9]\d*$), both owner ids together, a non-digit owner_steam_id/owner_discord_id/flag_id, or flag_id on a server whose mod is older than 2.0.68 (it doesn't report flags). |
server_unavailable | 503 | The game server is offline or unreachable. |
gateway_timeout | 504 | The server did not respond in time. |