Get an attachment file. For the file of a comment, you must be able to read the comment. You must have access to the project of its task. A vendor must also have a task on the entity. A client reads only the files of the comments they can see. For the file of a chat message, you must have access to the project of the entity. A client cannot read it, and a vendor must have a task on the entity. You cannot read a file that has no comment and no chat message, even as an administrator.
GET
/data/attachment-files/{instance_id}
curl
curl -X GET "http://api.example.com/data/attachment-files/a24a6ea4-ce75-4665-a070-57453082c25?relations=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/data/attachment-files/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {
"relations": true
}
payload = None
response = requests.get(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Response examples (200)
{
"id": "a24a6ea4-ce75-4665-a070-57453082c250",
"name": "attachment.pdf",
"comment_id": "b24a6ea4-ce75-4665-a070-57453082c250",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}