Getting comments of task through API: get_comments


Sample get_comments request

?action=get_comments&id_task=TASK_ID
Returns comments of selected task

Required parameters:
  • id_task — task ID
Optional parameters:
  • extra=files — attached files info

Returned data:
  • text — comment text
  • date_added — sending date and time
  • email — comment author email
  • name — comment author name and surname
  • files — attached files info (if request contains extra=files parameter):
  • id — file ID (can be used for downloading through download method)
    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://youraccount.worksection.com/download/123456)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
"status": "ok",
"data": [
{ "id": "COMMENT_ID", "page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/#comCOMMENT_ID",
"text": "COMMENT_TEXT",
"date_added": "YYYY—MM—DD HH:II",
"user_from": { "id": "USER_ID",
"email": "USER_EMAIL",
"name": "USER_NAME"
},   "files": [   { "id": "FILE_ID",   "size": "FILE_SIZE",   "name": "Example.docx",   "page": "/download/FILE_ID"   }   ],
}
]
}