The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
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.
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)
Did you ever get this to function correctly? I am unable to create or list blackout dates for course pacing using these API calls. When I pull a course that has blackout dates that are using course pacing, I get [] (empty) as the response. When I go to create dates, I get {'errors': [{'message': 'blackout_date is missing'}]}
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)
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in