AnsweredAssumed Answered

Calendar API: How to retrieve course events between specific dates?

Question asked by Andrea G Schmidt on Sep 4, 2019
Latest reply on Sep 6, 2019 by James Jones

I've been doing a lot of testing with the calendar api and am stuck on how to retrieve events for a course between specific dates. I'm thinking there may be a bug.

 

I created a bunch of events (using the API) between 9/5/2019 and 10/17/2019. Looking at https://canvas.instructure.com/doc/api/calendar_events.html#method.calendar_events_api.index, I am only able to retrieve events if I used "all_events": true:

 

Call: GET /api/v1/calendar_events

The following returns nothing:
{
"context_codes": ["course_12345"],
"start_at": "2019-09-03",
"end_at": "2019-10-05"
}

This returns all the events posted for the course:
{
"context_codes": ["course_12345"],
"all_events": true
}

 

Do I have an error in the first JSON body or is this a bug?

Outcomes