1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-02-03 13:22:19 +02:00
OpenIntegrations/docs/en/md/Bitrix24/Timekeeping/Get-task-time-accounting-list.mdx
Vitaly the Alpaca (bot) e96fbdb32f Main build (Jenkins)
2024-10-19 14:21:45 +03:00

88 lines
2.1 KiB
Plaintext

---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get task time accounting list
Get list of time accounting records for task
`Function GetTaskTimeAccountingList(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 | String, Number | ✔ | 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: [task.elapseditem.getlist](https://dev.1c-bitrix.ru/rest_help/tasks/task/elapseditem/getlist.php)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
TaskID = "2534";
Result = OPI_Bitrix24.GetTaskTimeAccountingList(URL, TaskID);
URL = "b24-ar17wx.bitrix24.by";
Token = "f69b1367006e9f06006b12e400000001000...";
Result = OPI_Bitrix24.GetTaskTimeAccountingList(URL, TaskID, Token);
```
```json title="Result"
{
"result": [
{
"ID": "828",
"TASK_ID": "2404",
"USER_ID": "1",
"COMMENT_TEXT": "",
"SECONDS": "3600",
"MINUTES": "60",
"SOURCE": "2",
"CREATED_DATE": "2024-10-09T09:20:37+03:00",
"DATE_START": "2024-10-09T09:20:37+03:00",
"DATE_STOP": "2024-10-09T09:20:37+03:00"
},
{
"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"
}
],
"total": 2,
"time": {
"start": 1728454837.88515,
"finish": 1728454837.93688,
"duration": 0.0517289638519287,
"processing": 0.0237300395965576,
"date_start": "2024-10-09T09:20:37+03:00",
"date_finish": "2024-10-09T09:20:37+03:00",
"operating_reset_at": 1728455437,
"operating": 0
}
}
```