1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-27 21:48:56 +02:00

85 lines
1.9 KiB
Markdown
Raw Normal View History

---
sidebar_position: 1
---
# Get comments list for a task
Get user comments list for a task
2024-07-10 13:58:29 +03:00
`Function GetTaskCommentsList(Val URL, Val TaskID, Val Token = "") Export`
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
| TaskID | --task | Number, String | Task ID |
2024-07-15 22:16:10 +03:00
| Token | --token | String | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
2024-07-10 14:05:58 +03:00
<br/>
:::tip
Method at API documentation: [task.commentitem.getlist](https://dev.1c-bitrix.ru/rest_help/tasks/task/commentitem/getlist.php)
:::
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-07-10 14:24:11 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/4swokunb3tk7h7dt/";
2024-07-14 19:04:01 +03:00
TaskID = "724";
Result = OPI_Bitrix24.GetTaskCommentsList(URL, TaskID);
2024-07-30 22:56:09 +03:00
URL = "b24-ar17wx.bitrix24.by";
2024-07-14 19:04:01 +03:00
Token = "adf89366006e9f06006b12e400000001000...";
Result = OPI_Bitrix24.GetTaskCommentsList(URL, TaskID, Token);
```
```sh title="CLI command example"
oint bitrix24 GetTaskCommentsList --url %url% --task %task% --filter %filter% --token %token%
```
```json title="Result"
2024-07-10 14:11:17 +03:00
{
"result": [
{
"POST_MESSAGE_HTML": null,
"ID": "1494",
"AUTHOR_ID": "1",
"AUTHOR_NAME": "Anton Titovets",
"AUTHOR_EMAIL": "",
"POST_DATE": "2024-07-06T19:52:07+00:00",
"POST_MESSAGE": "The task has been changed, do not split up"
},
{
"POST_MESSAGE_HTML": null,
"ID": "1496",
"AUTHOR_ID": "1",
"AUTHOR_NAME": "Anton Titovets",
"AUTHOR_EMAIL": "",
"POST_DATE": "2024-07-06T19:52:08+00:00",
"POST_MESSAGE": "The task has been changed, let's split up"
}
],
"time": {
"start": 1720295537.77876,
"finish": 1720295537.83513,
"duration": 0.0563700199127197,
"processing": 0.0240809917449951,
"date_start": "2024-07-06T19:52:17+00:00",
"date_finish": "2024-07-06T19:52:17+00:00",
"operating_reset_at": 1720296137,
"operating": 0
}
}
```