List chat attachments
GET
Returns every file part in the user-visible user and assistant messages of a chat, newest first, so a client can list a chat's attachments without paging through every message in the chat.
CoderSessionTokenheader
Coder-Session-Token<token>chat*stringChat ID
Format
uuidbefore_id?integerReturn attachments from messages with id < before_id
OK
application/json- response
attachments?array<>The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/chats/{chat}/attachments" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"Example Response200
{ "attachments": [ { "file": { "data": "string", "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767", "media_type": "string", "name": "string", "type": "file" }, "message_id": 0, "part_index": 0, "role": "user" } ]}