attachment_list
List all attachments stored on the server, with who uploaded each one. It is meant for admin tools that review or clean up storage.
Request
Section titled “Request”{ "cmd": "attachment_list", "offset": 0, "limit": 50}| Field | Type | Required | Description |
|---|---|---|---|
offset |
number | No | How many attachments to skip. Default 0. Rounded down, and negative values become 0. |
limit |
number | No | How many attachments to return. Default 50. Rounded down, then clamped to 1 to 100. |
Response
Section titled “Response”{ "cmd": "attachment_list", "attachments": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "diagram.png", "mime_type": "image/png", "size": 28431, "url": "https://chat.example.com/attachments/550e8400-e29b-41d4-a716-446655440000", "expires_at": 1788177600, "permanent": false, "width": 1280, "height": 720, "uploader": "alice", "created_at": 1787572800 } ], "total": 132, "total_bytes": 48210944, "offset": 0, "limit": 50}attachmentsholds attachment objects plusuploader(the uploader’s username) andcreated_at(upload time in Unix seconds). They are in upload order, oldest first.- Expired attachments are skipped and don’t count toward
offset. totalandtotal_bytesare the server’s running counts for all stored attachments, not only this page.offsetandlimitare the values after rounding and clamping.
This response goes to the caller only.
Permissions
Section titled “Permissions”Requires manage_server.
Errors
Section titled “Errors”val |
When |
|---|---|
Attachment storage is unavailable |
The server could not open its attachment metadata. |
| Validation message | offset or limit is not a number, for example limit: Expected number, received string. |
