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!
How do I unset an assignment's allowed_extensions using the API? I have tried everything I can think of, from null to empty quotes, to empty lists. I'm using the update endpoint in assignments (https://canvas.instructure.com/doc/api/assignments.html#method.assignments_api.update). The web interface works by unchecking "Restrict File Upload Types."
I believe you're using the built-in Canvas API (/doc/api/live#!) test tool to test?
Leaving the value blank works for me https://youracademy.instructure.com/api/v1/courses/*/assignments/*?assignment[allowed_extensions]=
A better tool to test API is Postman
I had initially had trouble setting an assignment to accept all filetypes using the Python canvasapi, and decided to try to the Live API. I tried leaving the field blank on the live API, and it didn't work. It appears to only send data from fields that are not blank. I tried empty quotes ("" and ''), brackets and braces ([], {}), the word None... nothing works.
You're right that Postman is better overall. I just like the documentation and quick boxes of the live one. Here may be a case where the live API cannot do what I want it to. Thanks for the suggestions @jerry_nguyen . Using POST with allowed_extensions=[] ought to work.
I did figure out how to do it with the Python canvasapi, something like
assignment.edit(assignment={'allowed_extensions':''}.
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