Skip to content

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.

{
"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.
{
"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
}
  • attachments holds attachment objects plus uploader (the uploader’s username) and created_at (upload time in Unix seconds). They are in upload order, oldest first.
  • Expired attachments are skipped and don’t count toward offset.
  • total and total_bytes are the server’s running counts for all stored attachments, not only this page.
  • offset and limit are the values after rounding and clamping.

This response goes to the caller only.

Requires manage_server.

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.