Hi - I'm getting a 422 Unprocessable Entity error when I try to test this API call (I'm using Advanced REST Client) :
https://class.yciw.net/api/v1/courses/114/assignments/3784/submissions?as_user_id=2398&submission[submission_type]=online_url&submission[url]=www.google.com
I'm using my admin access code in the header. Trying to submit this on behalf of student "2398."
Is it formatted incorrectly?
Thanks
Matt
matt5834,
I just tried this using ARC and it worked fine for me. It generates a "201 Created" response code.
I took your URL and my URL and pasted them next to each other and then put your IDs into my URL and I didn't see any differences, so I think you have the syntax correct.
Here are some things to look at.
Finally, this is not the reason, but www.google.com is not a URL. The URL includes the protocol, so https://www.google.com would be the correct way. Browsers often work if you type it into the location bar that way, but if you include it as a link on a web page, it probably (Apache does this by default, not sure about other webservers) gets turned into a relative link because it doesn't have the protocol and then you get a notice that it can't find the page www.google.com on the server. However, I tested it with www.google.com and Canvas took it -- but it also added http and not https to it. Still, it would be better to actually submit a URL.
Thank you James so much! I've been so frustrated by this so I greatly appreciate your help.
I verified all of your suggestions and everything checked out. Is this not working because I'm misunderstanding how to use the masquerading feature?? User 2398 is a student without permissions to masquerade and I'm using my access token in the header. This feature is supposed to work the other way around right? A user would masquerade as someone with permissions that can masquerade.... (???)
I've attached a pic for what it looks like in ARC for me...
I'm building an app that needs to allow the user (after going through the Oauth dance) to submit an assignment. Should I be doing this some other way??
The reason I put the as_user_id in there was because I wasn't being allowed to submit an assignment as a student.
I'm building a tool for my institution that imports grades from another LTI tool into Canvas so instructors can automate late assignment policies not otherwise supported by Canvas. I'm trying to use the LTIv1.3 ID which is readily available on the LTI-side as a link to the student record on Canvas, but I can't find the ID…
How can one track Canvas Media use without having the reports available from Canvas Studio? Checking API endpoints and the Data 2 schema, there do not seem to be dedicated Canvas Media endpoints. Am I missing some? A method I've considered is using the body field of the wiki_pages table, as this contains the html code of…
Hello, I'm trying to utilize an API call to pull completed certificates and was hoping to download and store the certs as a backup. I can successfully run the API call but it will not allow me to view the certificate unless I access the URL while signed into an account where it's "my" cert. Is there a permissions setting…
UI for weekly progression idea that rest in the Schedule tab of the **K-12 UI** of Canvas it's incomplete and I really would not take it and push it into instance but I am going to post it here because in the past people like @James && @robotcars || @Steve_25 have had terrific input in the past... maybe w/their eyes and…
I have a new React + Flask webapp. It has its own login for users to start using the app. I have added this as an external tool in Canvas. What I want initially is to see of canvas users can start using the webapp without having to login if they click on the external tool link in a canvas course. I have 2 methods…