You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
134 lines
3.7 KiB
Plaintext
Vendored
134 lines
3.7 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 5
|
|
description: Get user busy 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 user busy
|
|
Gets an array of user events in the specified interval
|
|
|
|
|
|
|
|
`Function GetUserBusy(Val URL, Val Users, Val StartDate, Val EndDate, Val Token = "") Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
|
|
| Users | --users | Number, Array Of Number | ✔ | IDs of users or a single user |
|
|
| StartDate | --from | Date | ✔ | Start date of the period |
|
|
| EndDate | --to | Date | ✔ | End date of the period |
|
|
| 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: [calendar.accessibility.get](https://apidocs.bitrix24.ru/api-reference/calendar/calendar-accessibility-get.html)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
|
|
CalendarID = "1502";
|
|
|
|
User = 1;
|
|
|
|
Week = 604800;
|
|
CurrentDate = OPI_Tools.GetCurrentDate();
|
|
|
|
StartDate = CurrentDate;
|
|
EndDate = CurrentDate + Week;
|
|
|
|
Result = OPI_Bitrix24.GetUserBusy(URL, User, StartDate, EndDate);
|
|
|
|
URL = "b24-ar17wx.bitrix24.by";
|
|
Token = "8a1bee68006e9f06006b12e400000001000...";
|
|
CalendarID = "1504";
|
|
|
|
Result = OPI_Bitrix24.GetUserBusy(URL, User, StartDate, EndDate, Token);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint bitrix24 GetUserBusy \
|
|
--url "b24-ar17wx.bitrix24.by" \
|
|
--users 1 \
|
|
--from "2025-10-15T10:04:53.9654373" \
|
|
--to "2025-10-22T10:04:53.9654373" \
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint bitrix24 GetUserBusy ^
|
|
--url "b24-ar17wx.bitrix24.by" ^
|
|
--users 1 ^
|
|
--from "2025-10-15T10:04:53.9654373" ^
|
|
--to "2025-10-22T10:04:53.9654373" ^
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"result": {
|
|
"1": [
|
|
{
|
|
"ID": "2788",
|
|
"NAME": "[Под вопросом]",
|
|
"DATE_FROM": "16.10.2025 10:04:00",
|
|
"DATE_TO": "16.10.2025 11:04:00",
|
|
"DATE_FROM_TS_UTC": "1760587440",
|
|
"DATE_TO_TS_UTC": "1763193840",
|
|
"~USER_OFFSET_FROM": 0,
|
|
"~USER_OFFSET_TO": 0,
|
|
"DT_SKIP_TIME": "N",
|
|
"TZ_FROM": "Europe/Moscow",
|
|
"TZ_TO": "Europe/Moscow",
|
|
"ACCESSIBILITY": "quest",
|
|
"IMPORTANCE": "low",
|
|
"EVENT_TYPE": null
|
|
},
|
|
{
|
|
"ID": "2792",
|
|
"NAME": "[Под вопросом]",
|
|
"DATE_FROM": "16.10.2025 10:04:00",
|
|
"DATE_TO": "16.10.2025 11:04:00",
|
|
"DATE_FROM_TS_UTC": "1760587440",
|
|
"DATE_TO_TS_UTC": "1763193840",
|
|
"~USER_OFFSET_FROM": 0,
|
|
"~USER_OFFSET_TO": 0,
|
|
"DT_SKIP_TIME": "N",
|
|
"TZ_FROM": "Europe/Moscow",
|
|
"TZ_TO": "Europe/Moscow",
|
|
"ACCESSIBILITY": "quest",
|
|
"IMPORTANCE": "low",
|
|
"EVENT_TYPE": null
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"start": 1760522699,
|
|
"finish": 1760522699.22746,
|
|
"duration": 0.227454900741577,
|
|
"processing": 0,
|
|
"date_start": "2025-10-15T10:04:59+00:00",
|
|
"date_finish": "2025-10-15T10:04:59+00:00",
|
|
"operating_reset_at": 1760523299,
|
|
"operating": 0
|
|
}
|
|
}
|
|
```
|