1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00
Files
OpenIntegrations/docs/en/md/Bitrix24/Tasks-management/Get-task-history.mdx
Vitaly the Alpaca (bot) 626ac1c614 Main build (Jenkins)
2025-10-27 16:23:35 +03:00

223 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 = "8438";
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID);
URL = "b24-ar17wx.bitrix24.by";
Token = "0ebbf768006e9f06006b12e400000001000...";
TaskID = "8440";
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID, Token);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 GetTaskHistory \
--url "b24-ar17wx.bitrix24.by" \
--task "8402" \
--token "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 GetTaskHistory ^
--url "b24-ar17wx.bitrix24.by" ^
--task "8402" ^
--token "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": {
"list": [
{
"id": 107024,
"createdDate": "2025-10-27T10:06:08+00:00",
"field": "NEW",
"value": {
"from": null,
"to": null
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107026,
"createdDate": "2025-10-27T10:06:09+00:00",
"field": "START_DATE_PLAN",
"value": {
"from": "",
"to": "1761559568"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107028,
"createdDate": "2025-10-27T10:06:09+00:00",
"field": "END_DATE_PLAN",
"value": {
"from": "",
"to": "1761598800"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107030,
"createdDate": "2025-10-27T10:06:09+00:00",
"field": "DURATION_PLAN_SECONDS",
"value": {
"from": "",
"to": "39232"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107044,
"createdDate": "2025-10-27T10:06:15+00:00",
"field": "TITLE",
"value": {
"from": "New task",
"to": "Another task title"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107046,
"createdDate": "2025-10-27T10:06:15+00:00",
"field": "DESCRIPTION",
"value": {
"from": "",
"to": ""
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107048,
"createdDate": "2025-10-27T10:06:15+00:00",
"field": "PRIORITY",
"value": {
"from": "2",
"to": "1"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107054,
"createdDate": "2025-10-27T10:06:27+00:00",
"field": "RESPONSIBLE_ID",
"value": {
"from": "1",
"to": "2860"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107056,
"createdDate": "2025-10-27T10:06:28+00:00",
"field": "COMMENT",
"value": {
"from": null,
"to": "19684"
},
"user": {
"id": 1,
"name": "Антон",
"lastName": "Титовец",
"secondName": "",
"login": "VKuser657846756"
}
},
{
"id": 107060,
"createdDate": "2025-10-27T10:06:30+00:00",
...
```