After an outage on September 1, the Instructure Community is now fully available, including guides, release notes, forums, and groups. If some styling still looks unusual, clear your cache and cookies.
Found this content helpful? Log in or sign up to leave a like!
I am trying to use
documented here Canvas LMS REST API Documentation
F.ex. https://ikt.instructure.com/api/v1/users/312/files/quota
Even when I am logged in as an administrator, I get "while(1);{"status":"unauthorized","errors":[{"message":"user not authorized to perform that action"}]}"
My plan was to get an overview of the quota used by all the students to see if we should increase it.
Solved! Go to Solution.
@erlend_thune it seems you have two options here:
If this is an interal report, Masquerading would likely be the easiest approach.
Your syntax for the call would look like this:
Let me know if this helps.
@erlend_thune it seems you have two options here:
If this is an interal report, Masquerading would likely be the easiest approach.
Your syntax for the call would look like this:
Let me know if this helps.
Thanks a lot! I only need it to check if any of the students are getting close to their file quota, so the
worked perfectly!
Awesome, thanks for the feedback.
@garth , @erlend_thune I'm getting the same error despite adding the masquerade string. Example URL: https://seattleu.instructure.com/api/v1/users/12345/files/quota?as_user_id=45678
12345 is the user I'm trying to see the file quota for and my own user ID is at the end.
You must use the same user id both places, i.e. https://seattleu.instructure.com/api/v1/users/12345/files/quota?as_user_id=12345
I guess the as_user_id masquerades you as that user before it runs the command.
That did it! Thanks @erlend_thune ! It seems a bit counter intuitive to require masquerading for that call to work and Instructure should add that info to their documentation.
@buellj I apologize for the incorrect example that I posted, not sure what I was thinking, sorry for the trouble it may have caused.
Absolutely no worries @garth - I wouldn't have found the solution without your response so a huge thank you!!! We just created a first version of a Node JS app that reads a CSV (the user provisioning report), does a bunch of API calls to get the quota used and then stores that in another CSV file.
Yes, @garth . If someone is to blame, it is me. I should have posted a message about it the moment I found out! Your response saved me to!
To 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