Requesting help with "child_event_data" calendar event query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I have written a short script that posts calendar events in the given courses. My query parameters look like this:
This gives a 500 internal server error. As far as I understand the documentation, it should be working. Does anyone have a guess or idea what I'm doing wrong?
Thanks in advance!
Tamas
EDIT:
Further playing with the API I found out the following: if I create a course-level event, I am able to "swap" it into a section-level event with the following:
/api/v1/calendar_events/28446?
calendar_event[title]=title&
calendar_event[child_event_data][0][context_code]=course_section_4423&
calendar_event[child_event_data][0][start_at]=2022-08-09T16:00:00Z&
calendar_event[child_event_data][0][end_at]=2022-08-09T17:00:00Z&
calendar_event[child_event_data][1][context_code]=course_section_2459&
calendar_event[child_event_data][1][start_at]=2022-08-09T16:00:00Z&
calendar_event[child_event_data][1][end_at]=2022-08-09T17:00:00Z&
calendar_event[duplicate][count]=2&
calendar_event[duplicate][frequency]=weekly
The original course-level event was duplicated weekly, with each having its own eventID. This method updates only one specified instance of that event-series and ignores the count and frequency queries here. It feels lame to loop over each course-level event one by one to update them and I don't understand what the issue is with the original query I posted above when the documentation states that it should be written that way.