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
tip
Method at API documentation: calendar.event.get
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";
Token = "2f89d867006e9f06006b12e400000001000...";
EventID = "690";
CalendarID1 = "462";
CalendarID2 = "464";
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);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint bitrix24 GetCalendarEvents \
--url "b24-ar17wx.bitrix24.by" \
--owner 1 \
--type "user" \
--filter "{'from':'2025-03-19T11:12:19.8718315Z','to':'2025-03-20T11:12:19.8718315Z','section':[478,480]}" \
--token "***"
:: JSON data can also be passed as a path to a .json file
oint bitrix24 GetCalendarEvents ^
--url "b24-ar17wx.bitrix24.by" ^
--owner 1 ^
--type "user" ^
--filter "{'from':'2025-03-19T11:12:19.8718315Z','to':'2025-03-20T11:12:19.8718315Z','section':[478,480]}" ^
--token "***"
Result
{
"result": [
{
"ID": "302",
"PARENT_ID": "302",
"ACTIVE": "Y",
"DELETED": "N",
"CAL_TYPE": "user",
"OWNER_ID": "1",
"NAME": "New event",
"DATE_FROM": "10.02.2025 00:45:00",
"DATE_TO": "10.02.2025 01:45:00",
"ORIGINAL_DATE_FROM": null,
"TZ_FROM": "Europe/Minsk",
"TZ_TO": "Europe/Minsk",
"TZ_OFFSET_FROM": "10800",
"TZ_OFFSET_TO": "10800",
"DATE_FROM_TS_UTC": "1739126723",
"DATE_TO_TS_UTC": "1741733100",
"DT_SKIP_TIME": "N",
"DT_LENGTH": 3600,
"EVENT_TYPE": null,
"CREATED_BY": "1",
"DATE_CREATE": "09.02.2025 00:45:23",
"TIMESTAMP_X": "09.02.2025 00:45:23",
"DT_FROM": null,
"DT_TO": null,
"PRIVATE_EVENT": "1",
"ACCESSIBILITY": "quest",
"IMPORTANCE": "normal",
"IS_MEETING": true,
"MEETING_STATUS": "H",
"MEETING_HOST": "1",
"MEETING": {
"HOST_NAME": "Антон Титовец",
"TEXT": null,
"OPEN": false,
"NOTIFY": true,
"REINVITE": false,
"MAIL_FROM": false
},
"LOCATION": "Office",
"REMIND": [
{
"type": "day",
"count": 1
}
],
"COLOR": "#230000",
"TEXT_COLOR": "",
"RRULE": {
"FREQ": "DAILY",
"COUNT": 3,
"INTERVAL": 10,
"UNTIL": "01.01.2038",
"~UNTIL": "",
"UNTIL_TS": 2145916800
},
"EXDATE": "",
"DAV_XML_ID": "20250209T214500Z-307ee6274dc3299c8c7646f37fe78038@b24-ar17wx.bitrix24.by",
"G_EVENT_ID": "",
"DAV_EXCH_LABEL": "",
"CAL_DAV_LABEL": "",
"VERSION": "1",
"ATTENDEES_CODES": [
"U1",
"U10"
],
"RECURRENCE_ID": null,
"RELATIONS": "",
"SECTION_ID": "262",
"SYNC_STATUS": null,
"UF_CRM_CAL_EVENT": false,
"UF_WEBDAV_CAL_EVENT": false,
"SECTION_DAV_XML_ID": null,
"DATE_FROM_FORMATTED": "Mon Feb 10 2025 00:45:00",
"DATE_TO_FORMATTED": "Mon Feb 10 2025 01:45:00",
"SECT_ID": "262",
"OPTIONS": null,
"ATTENDEE_LIST": [
{
"id": 1,
"entryId": "302",
"status": "H"
},
{
"id": 10,
"entryId": "304",
"status": "Q"
}
],
"COLLAB_ID": null,
"~RRULE_DESCRIPTION": "каждый 10-й день, от 10.02.2025, 3 раз(а)",
"attendeesEntityList": [
{
"entityId": "user",
"id": 1
},
{
"entityId": "user",
"id": 10
}
],
"~DATE_FROM": "10.02.2025 00:45:00",
"~DATE_TO": "10.02.2025 01:45:00",
"RINDEX": 0,
"~USER_OFFSET_FROM": 0,
"~USER_OFFSET_TO": 0
},
{
"ID": "306",
"PARENT_ID": "306",
"ACTIVE": "Y",
"DELETED": "N",
"CAL_TYPE": "user",
"OWNER_ID": "1",
"NAME": "New event",
"DATE_FROM": "10.02.2025 00:45:00",
"DATE_TO": "10.02.2025 01:45:00",
"ORIGINAL_DATE_FROM": null,
"TZ_FROM": "Europe/Minsk",
"TZ_TO": "Europe/Minsk",
"TZ_OFFSET_FROM": "10800",
"TZ_OFFSET_TO": "10800",
"DATE_FROM_TS_UTC": "1739126723",
"DATE_TO_TS_UTC": "1741733100",
"DT_SKIP_TIME": "N",
"DT_LENGTH": 3600,
"EVENT_TYPE": null,
"CREATED_BY": "1",
"DATE_CREATE": "09.02.2025 00:45:24",
"TIMESTAMP_X": "09.02.2025 00:45:24",
"DT_FROM": null,
"DT_TO": null,
"PRIVATE_EVENT": "1",
"ACCESSIBILITY": "quest",
"IMPORTANCE": "normal",
"IS_MEETING": true,
"MEETING_STATUS": "H",
"MEETING_HOST": "1",
"MEETING": {
"HOST_NAME": "Антон Титовец",
"TEXT": null,
"OPEN": false,
"NOTIFY": true,
"REINVITE": false,
"MAIL_FROM": false
},
"LOCATION": "Office",
"REMIND": [
...