1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-01 22:29:52 +02:00
Files
OpenIntegrations/docs/en/md/Bitrix24/Calendar-events-management/Get-calendar-events.mdx

67 lines
1.9 KiB
Plaintext
Raw Normal View History

2025-01-27 21:50:57 +03:00
---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get calendar events
Gets events of calendars with or without filters
`Function GetCalendarEvents(Val URL, Val OwnerID, Val Type, Val Filter = "", Val Token = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
| OwnerID | --owner | String, Number | ✔ | Calendar owner ID |
| Type | --type | String | ✔ | Calendar type: user, group, company_calendar |
| Filter | --filter | Structure Of KeyAndValue | ✖ | Events filter. See GetCalendarEventsFilterStructure |
| 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.event.get](https://apidocs.bitrix24.ru/api-reference/calendar/calendar-event/calendar-event-get.html)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
OwnerID = 1;
Type = "user";
Result = OPI_Bitrix24.GetCalendarEvents(URL, OwnerID, Type);
URL = "b24-ar17wx.bitrix24.by";
2025-02-07 10:30:14 +03:00
Token = "39b8a567006e9f06006b12e400000001000...";
EventID = "162";
CalendarID1 = "188";
CalendarID2 = "190";
2025-01-27 21:50:57 +03:00
Tomorrow = OPI_Tools.GetCurrentDate() + 86400;
NextDay = Tomorrow + 86400;
ArrayOfCalendars = New Array;
ArrayOfCalendars.Add(CalendarID1);
ArrayOfCalendars.Add(CalendarID2);
Filter = New Structure;
Filter.Insert("from" , Tomorrow);
Filter.Insert("to" , NextDay);
Filter.Insert("section", ArrayOfCalendars);
Result = OPI_Bitrix24.GetCalendarEvents(URL, OwnerID, Type, Filter, Token);
```