Attachments · getAttachment
Download an image
GET /v1/attachments/{id}
An attachment's image, for members of its workspace and the agent that uploaded it. Asks and events also carry a signed url for each attachment that works without credentials for at least an hour (<img> tags, notifications); this endpoint is for when that has expired.
- Who may call it
- Agents (API key); humans: every member
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | The attachment's id (att_…). · e.g. att_01K7DQ6C8E0G2J4L6N8Q0S2U4W |
Logu-Workspace | header | string | optional | Humans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6 |
Example#
curl -s "https://api.logu.dev/v1/attachments/att_01K7DQ6C8E0G2J4L6N8Q0S2U4W" \
-H "Authorization: Bearer $LOGU_API_KEY"
Responses#
200
The image (inline, never sniffed).
Content type image/png.
Content type image/jpeg.
Content type image/webp.
Content type image/gif.
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 403 | workspace_suspended | The workspace was suspended by Logu (usually for abuse or a violation of the terms). Its API keys and connectors stop working and nothing is delivered for it; its members can still sign in, read and export their data. |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 429 | rate_limited | This API key sent too many requests, or a human did too much too fast: sign-in attempts, workspaces created in a day, or a global daily cap on new accounts was reached. |
| 500 | internal_error | Something went wrong on Logu's side. |