1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/md/Bitrix24/Tasks-management/Get-task-history.mdx
Vitaly the Alpaca (bot) 347c900389 Main build (Jenkins)
2025-09-16 09:07:33 +03:00

224 lines
4.8 KiB
Plaintext
Vendored

---
sidebar_position: 19
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
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get task history
Get history of task changing
`Function GetTaskHistory(Val URL, Val TaskID, Val Token = "") Export`
| 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 |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
Method at API documentation: [tasks.task.history.list](https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_history_list.php)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
TaskID = "7884";
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID);
URL = "b24-ar17wx.bitrix24.by";
Token = "75d8c668006e9f06006b12e400000001000...";
TaskID = "7886";
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID, Token);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 GetTaskHistory \
--url ""b24-ar17wx.bitrix24.by"" \
--task ""7992"" \
--token "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 GetTaskHistory ^
--url ""b24-ar17wx.bitrix24.by"" ^
--task ""7992"" ^
--token "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": {
"list": [
{
"id": 100356,
"createdDate": "2025-09-15T22:44:50+00:00",
"field": "NEW",
"value": {
"from": null,
"to": null
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100358,
"createdDate": "2025-09-15T22:44:53+00:00",
"field": "START_DATE_PLAN",
"value": {
"from": "",
"to": "1757976290"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100360,
"createdDate": "2025-09-15T22:44:53+00:00",
"field": "END_DATE_PLAN",
"value": {
"from": "",
"to": "1758056400"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100362,
"createdDate": "2025-09-15T22:44:53+00:00",
"field": "DURATION_PLAN_SECONDS",
"value": {
"from": "",
"to": "80110"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100376,
"createdDate": "2025-09-15T22:45:06+00:00",
"field": "TITLE",
"value": {
"from": "New task",
"to": "Another task title"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100378,
"createdDate": "2025-09-15T22:45:06+00:00",
"field": "DESCRIPTION",
"value": {
"from": "",
"to": ""
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100380,
"createdDate": "2025-09-15T22:45:06+00:00",
"field": "PRIORITY",
"value": {
"from": "2",
"to": "1"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100386,
"createdDate": "2025-09-15T22:45:34+00:00",
"field": "RESPONSIBLE_ID",
"value": {
"from": "1",
"to": "2664"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100388,
"createdDate": "2025-09-15T22:45:35+00:00",
"field": "COMMENT",
"value": {
"from": null,
"to": "18602"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 100392,
"createdDate": "2025-09-15T22:45:40+00:00",
...
```