Requesting an Attachment
To request an attachment you’ll need the ID of the attachment (attachmentId). The response does not contain the file itself, you’ll have to request via the dedicated endpoint for that purpose.
HTTP-Method
GET
Path
/api/rest/v3/frontend/attachments/{attachmentId}
Authentification
Path Parameter
attachmentId
Query Parameter
-none-
Responses
Action | Response | Description |
---|---|---|
success | 200 | The DTO with the file information |
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" |
Response:
1 2 3 4 5 6 7 8 |
{ "id": "417990c1-2238-44dc-9b04-3fb697753821", "name": "cv.pdf", "type": "application/pdf", "fileSize": 12345, "content": null } |