2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 19
2025-05-05 11:15:20 +03:00
description: Get task history and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get task history
Get history of task changing
`Function GetTaskHistory(Val URL, Val TaskID, Val Token = "") Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | 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 |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
2024-11-21 13:27:18 +03:00
Method at API documentation: [tasks.task.history.list](https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_history_list.php)
2024-10-15 10:16:04 +03:00
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-21 11:36:43 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
TaskID = "8420";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID);
2025-10-21 11:36:43 +03:00
URL = "b24-ar17wx.bitrix24.by";
Token = "3b1af468006e9f06006b12e400000001000...";
TaskID = "8422";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID, Token);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 GetTaskHistory \
2025-10-07 19:27:04 +03:00
--url "b24-ar17wx.bitrix24.by" \
2025-10-15 14:32:00 +03:00
--task "8402" \
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 GetTaskHistory ^
2025-10-07 19:27:04 +03:00
--url "b24-ar17wx.bitrix24.by" ^
2025-10-15 14:32:00 +03:00
--task "8402" ^
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"result": {
"list": [
{
2025-10-15 14:32:00 +03:00
"id": 105938,
"createdDate": "2025-10-15T09:49:30+00:00",
2024-10-15 10:16:04 +03:00
"field": "NEW",
"value": {
"from": null,
"to": null
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105940,
"createdDate": "2025-10-15T09:49:32+00:00",
2024-10-15 10:16:04 +03:00
"field": "START_DATE_PLAN",
"value": {
"from": "",
2025-10-15 14:32:00 +03:00
"to": "1760521770"
2024-10-15 10:16:04 +03:00
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105942,
"createdDate": "2025-10-15T09:49:32+00:00",
2024-10-15 10:16:04 +03:00
"field": "END_DATE_PLAN",
"value": {
"from": "",
2025-10-15 14:32:00 +03:00
"to": "1760562000"
2024-10-15 10:16:04 +03:00
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105944,
"createdDate": "2025-10-15T09:49:32+00:00",
2024-10-15 10:16:04 +03:00
"field": "DURATION_PLAN_SECONDS",
"value": {
"from": "",
2025-10-15 14:32:00 +03:00
"to": "40230"
2024-10-15 10:16:04 +03:00
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105958,
"createdDate": "2025-10-15T09:49:46+00:00",
2024-10-15 10:16:04 +03:00
"field": "TITLE",
"value": {
"from": "New task",
"to": "Another task title"
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105960,
"createdDate": "2025-10-15T09:49:46+00:00",
2024-10-15 10:16:04 +03:00
"field": "DESCRIPTION",
"value": {
"from": "",
"to": ""
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105962,
"createdDate": "2025-10-15T09:49:46+00:00",
2024-10-15 10:16:04 +03:00
"field": "PRIORITY",
"value": {
"from": "2",
"to": "1"
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105968,
"createdDate": "2025-10-15T09:50:19+00:00",
2024-10-15 10:16:04 +03:00
"field": "RESPONSIBLE_ID",
"value": {
"from": "1",
2025-10-15 14:32:00 +03:00
"to": "2830"
2024-10-15 10:16:04 +03:00
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105970,
"createdDate": "2025-10-15T09:50:20+00:00",
2024-10-15 10:16:04 +03:00
"field": "COMMENT",
"value": {
"from": null,
2025-10-15 14:32:00 +03:00
"to": "19510"
2024-10-15 10:16:04 +03:00
},
"user": {
2025-09-12 20:23:31 +03:00
"id": 1,
2024-10-15 10:16:04 +03:00
"name": "Антон",
"lastName": "Титовец",
2025-09-12 20:23:31 +03:00
"secondName": "",
2024-10-15 10:16:04 +03:00
"login": "VKuser657846756"
}
},
{
2025-10-15 14:32:00 +03:00
"id": 105974,
"createdDate": "2025-10-15T09:50:25+00:00",
2024-10-15 10:16:04 +03:00
...
```