Apollo API Documentation

Events API calls

Check the docs for the legacy version of the events API

List all events

GET /cal-events?#{search_query}

Returns a collection of events that are visible to the authenticated user. Use the search query to refine your search. Available parameters are:

  • “page”: if the results are many you can jump to the next page using the “page” parameter.
  • “from”: you can ignore events before a certain date.
  • “to”: you can ignore events after a certain date.
  • “calendar-ids”: a list of calendar ids in the form of a string (Ex.: '42633755,42600755,3648922').
  • “category-ids”: a list of category ids in the form of a string (Ex.: '57584674,39475627,9675746').

Response

{
	"continued-at":"/events?page=2",
	"events":[
		{
			"id":"94832146",
			"title":"An event",
			...
		},
		{
			"id":"83411557",
			"title":"Another event",
			...
		},
		...
	]
}

Get event

GET /cal-events/#{id}

Returns a single event record identified by its integer ID.

Response

{
	"event":{
		"id":"94832146",
		"title":"An event",
		...
	}
}

Create event

POST /cal-events

Creates a new event.

Request

{
	"event":{
		"title":"Meet up",
		"location":"New York",
		"start-date":"2016-11-05 10:30:00",
		"end-date":"2016-11-05 13:30:00",
		"all-day":"0",
		"notes":"Important",
		"privacy":"public",
		"recurrence":"weekly"
	}
}

Response

Returns HTTP status code 201 (“Created”) on success. The response contain the new event ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.

{
	"event-id":"9056560"
}

Update event

PUT /cal-events/#{id}

Updates an existing event.

Request

{
	"event":{
		"title":"Updated event",
		"privacy":"for me"
	}
}

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.


Destroy event

DELETE /cal-events/#{id}

Destroys the given event.

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.


Destroy series

DELETE /cal-events/delete-series/#{id}

Destroys the given event series.
Please note: all instances of the event will be deleted!

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.