Showing results for 
Show  only  | Search instead for 
Did you mean: 
Community Participant

Unset allowed_extensions using API

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 ( The web interface works by unchecking "Restrict File Upload Types."

Labels (2)
0 Kudos
2 Replies
Community Contributor

I believe you're using the built-in Canvas API (/doc/api/live#!) test tool to test?

Leaving the value blank works for me*/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



Tags (2)