Getting comments of tasks or subtasks through API: get_comments
Sample get_comments request
https://your—domain.com/api/admin/v2/?action=get_comments&
page=/project/PROJECT_ID/TASK_ID/SUBTASK_ID/&hash=HASH
Required parameters:
- page — task/subtask link (see link format for details)
Optional parameters:
- extra=files — returns information about files attached to comments
Returned data:
- text — comment text
- date_added — sending date and time
- email — comment author email
- name — comment author name and surname
- files — information about the files attached in the comments (if the request contains corresponding extra parameter):
id — unique file identifier (can be used in the download method for downloading via API)
size — file size (in bytes)
name — file name with its extension
page — part of the link for direct download (for the full path put the address of your account in front, for example
https://your-domain.worksection.com/download/123456)
https://your-domain.worksection.com/download/123456)
Sample JSON response
If the request succeeds, the response will contain ok status and the following data:
{
"status": "ok",
"data": [
{
"text": "USER_COMMENT_TEXT",
"date_added": "YYYY—MM—DD HH:II",
"user_from": {
"email": "USER_EMAIL",
"name": "USER_NAME"
},
"files": [
{
"id": "FILE_ID",
"size": "FILE_SIZE",
"name": "Example.docx",
"page": "/download/FILE_ID"
}
],
}
]
}
Was this article helpful?
Yes, thank you!
No