1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-02-03 13:22:19 +02:00

83 lines
2.0 KiB
Markdown
Raw Normal View History

---
sidebar_position: 1
---
# Get comments list for a task
Get user comments list for a task
`Function GetTaskCommentsList(Val URL, Val TaskID, Val Token = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
| TaskID | --task | Number, String | Task ID |
| Token | --token | String | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
Method at API documentation: [task.commentitem.getlist](https://dev.1c-bitrix.ru/rest_help/tasks/task/commentitem/getlist.php)
:::
<br/>
```bsl title="Code example"
2024-08-20 13:11:21 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
TaskID = "1398";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.GetTaskCommentsList(URL, TaskID);
URL = "b24-ar17wx.bitrix24.by";
2024-08-20 13:11:21 +03:00
Token = "ec4dc366006e9f06006b12e400000001000...";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.GetTaskCommentsList(URL, TaskID, Token);
```
```sh title="CLI command example"
oint bitrix24 GetTaskCommentsList --url "b24-ar17wx.bitrix24.by" --task "1082" --token "fe3fa966006e9f06006b12e400000001000..."
```
```json title="Result"
2024-08-14 09:06:31 +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
}
}
```