Commands › Inventory
listinventory
Also accepted as inventory_list
List a folder (or the root) of the bot's inventory
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "listinventory",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"uuid": "7c1e9b2a-4d3f-4a8b-9c6d-000000000000",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
uuidUUID | no | Folder to list. Leave out for the root folder. |
extendedflag | no | 1 for permissions, creation date and escaped names. |
Returns
| Field | Type | Description |
|---|---|---|
list | string | One line per entry, folders first. Items: uuid;Type;subtype;assetuuid;flags;name (flags is WORN or empty). Extended adds ;ownerPerms;nextPerms;createdUnix and URL-escapes names. |
Example response
{
"result": "OK",
"action": "listinventory",
"list": "7c1e9b2a-4d3f-4a8b-9c6d-000000000000;Folder;;;;Objects\n5d2d7a1d-0e8e-4f5d-a678-000000000000;Notecard;0;d1e2f3a4-0000-4000-8000-000000000005;;Welcome"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Only the folder's direct contents are listed, not sub-folders' contents.
- In the plain format a name containing ; or a line break breaks the line — use extended=1 if names may contain them.