API Documentation Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023
02:55 PM
The api documentaiton for blackout dates for putting / posting currently implies parameters are all at the top level of the object. Like this
{
start_date: DATE
end_date: DATE
}
However, this doesn't work. It does work if it's wrapped in a blackout_date.
{
blackout_date: {
start_date: DATE
end_date: DATE
}
}
Here's where I'm referring to:
https://canvas.instructure.com/doc/api/blackout_dates.html
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023
12:05 PM
I think I have the solution for you. To create a blackout date you must use POST in the following format for the data field (Python):
data = {
'blackout_date': {
'start_date': DATE,
'end_date': DATE,
'event_title': TITLE
}
}
requests.post(URL, params=payload, json=data)