1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-21 22:43:09 +02:00

81 lines
2.2 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 7
---
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
# Stop timekeeping
Stops user timekeeping
`Function StopTimekeeping(Val URL, Val UserID = "", Val Time = "", Val Report = "", 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 |
| UserID | --userid | String, Number | ✖ | Users ID. Current by default |
| Time | --time | Date | ✖ | Stop time. The date must match the current. Current time by default. |
| Report | --report | String | ✖ | Reason for change. Required when Time is specified and free schedule is disabled |
| 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
2024-11-21 13:27:18 +03:00
Method at API documentation: [timeman.close](https://dev.1c-bitrix.ru/rest_help/timeman/base/timeman_close.php)
2024-10-15 10:16:04 +03:00
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-11-02 22:50:30 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/yg2...";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.StopTimekeeping(URL);
URL = "b24-ar17wx.bitrix24.by";
2024-12-05 15:25:02 +03:00
Token = "f3925167006e9f06006b12e400000001000...";
2024-10-15 10:16:04 +03:00
UserID = 1;
Time = OPI_Tools.GetCurrentDate();
Report = "Time off";
Result = OPI_Bitrix24.StopTimekeeping(URL, UserID, Time, Report, Token);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 StopTimekeeping \
2024-10-22 08:59:24 +03:00
--url "b24-ar17wx.bitrix24.by" \
--userid 1 \
2024-12-04 15:18:40 +03:00
--time "2024-12-03T10:40:38.6472593" \
2024-10-22 08:59:24 +03:00
--report "Time off" \
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 StopTimekeeping ^
2024-10-22 08:59:24 +03:00
--url "b24-ar17wx.bitrix24.by" ^
--userid 1 ^
2024-12-04 15:18:40 +03:00
--time "2024-12-03T10:40:38.6472593" ^
2024-10-22 08:59:24 +03:00
--report "Time off" ^
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"error": "WRONG_DATETIME_FORMAT",
"error_description": "Wrong datetime format"
}
```