You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
223 lines
4.8 KiB
Plaintext
Vendored
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 = "8618";
|
|
|
|
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID);
|
|
|
|
URL = "b24-ar17wx.bitrix24.by";
|
|
Token = "53100369006e9f06006b12e400000001000...";
|
|
TaskID = "8620";
|
|
|
|
Result = OPI_Bitrix24.GetTaskHistory(URL, TaskID, Token);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint bitrix24 GetTaskHistory \
|
|
--url "b24-ar17wx.bitrix24.by" \
|
|
--task "8670" \
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint bitrix24 GetTaskHistory ^
|
|
--url "b24-ar17wx.bitrix24.by" ^
|
|
--task "8670" ^
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"result": {
|
|
"list": [
|
|
{
|
|
"id": 110288,
|
|
"createdDate": "2025-10-31T11:52:31+00:00",
|
|
"field": "NEW",
|
|
"value": {
|
|
"from": null,
|
|
"to": null
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110290,
|
|
"createdDate": "2025-10-31T11:52:32+00:00",
|
|
"field": "START_DATE_PLAN",
|
|
"value": {
|
|
"from": "",
|
|
"to": "1761911551"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110292,
|
|
"createdDate": "2025-10-31T11:52:32+00:00",
|
|
"field": "END_DATE_PLAN",
|
|
"value": {
|
|
"from": "",
|
|
"to": "1761944400"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110294,
|
|
"createdDate": "2025-10-31T11:52:32+00:00",
|
|
"field": "DURATION_PLAN_SECONDS",
|
|
"value": {
|
|
"from": "",
|
|
"to": "32849"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110308,
|
|
"createdDate": "2025-10-31T11:52:38+00:00",
|
|
"field": "TITLE",
|
|
"value": {
|
|
"from": "New task",
|
|
"to": "Another task title"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110310,
|
|
"createdDate": "2025-10-31T11:52:38+00:00",
|
|
"field": "DESCRIPTION",
|
|
"value": {
|
|
"from": "",
|
|
"to": ""
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110312,
|
|
"createdDate": "2025-10-31T11:52:38+00:00",
|
|
"field": "PRIORITY",
|
|
"value": {
|
|
"from": "2",
|
|
"to": "1"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110318,
|
|
"createdDate": "2025-10-31T11:52:52+00:00",
|
|
"field": "RESPONSIBLE_ID",
|
|
"value": {
|
|
"from": "1",
|
|
"to": "2956"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110320,
|
|
"createdDate": "2025-10-31T11:52:52+00:00",
|
|
"field": "COMMENT",
|
|
"value": {
|
|
"from": null,
|
|
"to": "20212"
|
|
},
|
|
"user": {
|
|
"id": 1,
|
|
"name": "Антон",
|
|
"lastName": "Титовец",
|
|
"secondName": "",
|
|
"login": "VKuser657846756"
|
|
}
|
|
},
|
|
{
|
|
"id": 110324,
|
|
"createdDate": "2025-10-31T11:52:54+00:00",
|
|
...
|
|
```
|