1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-31 23:20:02 +02:00
OpenIntegrations/docs/en/md/Bitrix24/Timekeeping/Get-task-time-accounting.mdx

76 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 4
---
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 time accounting
Get time accounting record data
`Function GetTaskTimeAccounting(Val URL, Val TaskID, Val RecordID, 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 | String, Number | ✔ | Task ID |
| RecordID | --record | String, Number | ✔ | Time record 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
Method at API documentation: [task.elapseditem.get](https://dev.1c-bitrix.ru/rest_help/tasks/task/elapseditem/get.php)
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-10-15 10:16:04 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
2024-10-19 14:21:45 +03:00
TaskID = "2534";
RecordID = "882";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetTaskTimeAccounting(URL, TaskID, RecordID);
URL = "b24-ar17wx.bitrix24.by";
2024-10-20 09:27:02 +03:00
Token = "67ac1467006e9f06006b12e400000001000...";
2024-10-19 14:21:45 +03:00
RecordID = "884";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetTaskTimeAccounting(URL, TaskID, RecordID, Token);
```
```json title="Result"
{
"result": {
"ID": "830",
"TASK_ID": "2404",
"USER_ID": "10",
"COMMENT_TEXT": "Time spent on work",
"SECONDS": "7200",
"MINUTES": "120",
"SOURCE": "2",
"CREATED_DATE": "2024-09-09T09:20:37+03:00",
"DATE_START": "2024-10-09T09:20:37+03:00",
"DATE_STOP": "2024-10-09T09:20:37+03:00"
},
"time": {
"start": 1728454837.65834,
"finish": 1728454837.70708,
"duration": 0.0487430095672607,
"processing": 0.0207769870758057,
"date_start": "2024-10-09T09:20:37+03:00",
"date_finish": "2024-10-09T09:20:37+03:00",
"operating_reset_at": 1728455437,
"operating": 0
}
}
```