Delete events

Delete events in bulk. Provide ids, or explicitly set include to false to delete every event matching the query filters (and every event outright when no filters are given); an empty body is rejected. Events synced from eSPACE are left in place and counted in skipped. Set parent to true to also remove the repeating series parent of each selected event when the caller may delete the parent and every one of its days; the series' other days are kept as standalone events. Otherwise the selected event is deleted on its own. Accepts the same filters as the events search endpoint, so a filtered delete removes exactly the events that search returns. The response reports how many were deleted and how many were skipped because the caller may not delete them (a group event of a group they neither administer nor belong to with the group's Events flag, or any other event outside the campuses where they hold events write or on a calendar outside the caller's calendar limit; this holds for explicit ids too, which are skipped and counted rather than answered with 403). While multi-campus is on, an event that also belongs to campuses outside the caller's access needs events write at every campus of its set; for a group event, a caller who neither administers the group nor holds its Events flag needs the groups permission at every campus of the group's set, and their group type and category limits must admit the group at every campus of that set. Explicit ids that include such an event answer 403 with shared_record_delete_desc and nothing is deleted; a select-all skips it and counts it in skipped, and a series parent goes only when every one of its days passes the same rule. An event available to every campus needs a caller with no campus limit and no restriction on that permission: explicit ids that include one answer 403 with every_campus_record_delete_desc (every_campus_organization_record_delete_desc while multi-org is on), and a select-all skips it. For an event outside a group, its calendar must also be admitted by the calendar limit at every campus of its set; explicit ids whose calendar the limit admits at only some of the event's campuses answer 403 with shared_record_delete_desc. Ids the caller cannot see are dropped before counting and are neither deleted nor skipped. When none of the given ids is visible, each is counted in skipped. When none of the given ids is visible, a caller without events write gets 403 instead. A selection holding an event outside a group (not synced from eSPACE) needs events write; without it the request is refused with 403 rather than counted. For a caller a campus limit or restricting override narrows, a selected date of a series follows the edit rule instead (events write at one of its campuses and its calendar admitted; for a group event, the group's edit access), unless the selection holds every date of the series, which counts as deleting the event and keeps the every-campus rule. While multi-campus or multi-org is on, a named organizer of a date outside a group passes that edit rule without events write, and form entries on a removed date stay at the series while another date remains.

Required permission: Full Write Events

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

Returns events where the name contains the given text.

string

Returns events where the description contains the given text.

date-time

Include events starting on or after this date (the church's timezone; time of day is ignored).

date-time

Include events starting on or before this date (the church's timezone; time of day is ignored).

boolean

If true, returns today's and future events. If false, returns events that have passed.

boolean

Whether to return events that are currently set as listed.

string

Comma-delimited list of calendar ids. Values come from /api/calendars.

string

Comma-delimited list of campus ids. Events without a campus are always included. Values come from /api/locations. Ignored while multi-campus is off.

string

Organization ids, comma-separated; honoured only while multi-org is on. A record matches when it is scoped to one of them or has a campus in one of them. Events available to every campus are always included.

int32
≥ 1

The person id of an organizer whose events should be returned.

boolean

Whether to return events which require registration or not.

boolean

Whether to return events which are tracking attendance via the check-in system.

string

Comma-delimited list of category ids. Values come from /api/property_values/event_types/values.

string

Returns events matching the given time period, overriding date.start and date.end. Accepted values are: today, tomorrow, this_week, next_week, this_month, next_month.

int32
≥ 1

If set, returns events on the given group's calendar.

int32
≥ 1

The parent event id. If set, returns all child occurrences under the parent event.

int32

The id of a sign-up form. Use -1 to include only events without a sign-up form. Values come from /api/forms.

boolean

Whether the event is visible to the public (inherited from its calendar).

string

Free text search across event content. When set, results are returned in relevance order.

Body Params

Details on what to delete.

ids
array of doubles | null

The ids the operation applies to: an include list by default, or an exclude list when include is false. For deletes, required unless include is false.

ids
boolean | null

Whether ids is an include list (true, default) or an exclude list (false). Setting include to false with no ids applies the operation to every record matching the query filters.

boolean | null

When true, also removes the repeating series parent of each selected event when the caller may delete the parent and every one of its days; the series' other days are kept as standalone events. Otherwise the selected event is deleted on its own.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json