Get a comment. The response gives the author in person, the reply authors and the attachment files as objects. Set with_previews to true to get the previews as objects. An administrator can read all the comments. Other users must have access to the project of the task. A vendor must also have a task on the entity. Managers and supervisors read all the comments of the task. A client reads the comments of clients and the comments for clients. If the project isolates the clients, a client reads only their own comments and the comments for clients. Other users cannot read the comments of clients.
GET
/data/comments/{instance_id}
curl
curl -X GET "http://api.example.com/data/comments/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/comments/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",
"object_id": "b24a6ea4-ce75-4665-a070-57453082c250",
"person_id": "c24a6ea4-ce75-4665-a070-57453082c250",
"task_status_id": "d24a6ea4-ce75-4665-a070-57453082c250",
"text": "Comment text",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}