Request an Attachment-File
To get the actual file for an attachment, you can use this endpoint.
HTTP-Method
GET
Path
/api/rest/v3/frontend/attachments/{attachmentId}/content
Authentification
Path Parameter
attachmentId
Query Parameter
-none-
Responses
Action | Response | Description |
---|---|---|
success | 303 | You’ll get a redirect to the file |
authorization error | 401 / 403 | See here and here for details. |
not found | 404 – { “code”: “get_file_error”, “message”:”No attachment with id X found” } | No attachment could be found for the given ID |
Example call with curl and user access token
1 |
curl -i -H "Authorization: Bearer 31cb2exx-001e-4b59-babc-f0815tdad47d" -H "Content-Type: application/json" -X GET "https://api.softgarden.io/api/rest/v3/frontend/attachments/417990c1-2238-44dc-9b04-3fb697753821/content" |