Description
Retrieve a case file attachment. This endpoint returns the file contents for any supported file type.
Request
HTTP Method: GET
| Path Parameter | Description |
|---|---|
| case_id | The ID of the case. |
| file_id | The ID of the case file. |
curl -X GET \
https://<<META.tenant.domain>>/api/v2/cases/<<case_id>>/files/<<file_id>>/download \
-H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'
Response
A successful request will return the file contents with appropriate headers:
Note: To get file metadata only (without contents), use the /info endpoint instead.
- Content-Type: Set to the file's MIME type
- Content-Disposition:
inlinefor image files (jpg, jpeg, png, gif, bmp, svg, webp, avif, apng)attachmentfor all other file types
- Content-Security-Policy: Prevents script execution in downloaded files
A successful request using a Tines HTTP action will return a case file as JSON:
Field description
| Parameter | Description |
|---|---|
| filename | The name of the file. |
| content_type | The content type of the file. |
| guid | The guid of the file. |
| md5 | The md5 hash of the file. |
| sha56 | The sha56 of the file. |
| sizeinbytes | The file size in bytes. |
| base64encodedcontents | Base 64 encoded contents of the file. |
| path | The file path (guid). |
Sample response
{
"filename": "file",
"content_type": "image/png",
"guid": "78e03fc8-98cc-45dd-bf48-5a512fce6919",
"md5": "112cb817c59986e29de77744b3052b65",
"sha256": "807bd48b3c00aa05b0312410329c4a69c1559b1477cd17b9433e2b990f9b66b5",
"sizeinbytes": 355,
"base64encodedcontents": "iVBORw0KGgoANSUhEUgAABkAVO9K5CII=",
"path": "ecfe3731-252d-48ba-8754-011fd12a9f71"
}