Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
I'm working with a colleague to try and mass import outcomes into our Beta instance and we're not having any luck... After some time, I went to the Canvas Live API and attempted to Post a single outcome and now I'm getting this error.
{ "status": "unauthorized", "errors": [ { "message": "user not authorized to perform that action" } ] }
while(1);{"errors":[{"message":"The specified resource does not exist."}],"error_report_id":998378169}
Any ideas on what I'm missing?
@gbibb
Hi @jcrawford ,
Based on the message you are getting it appears that the user you are trying to perform the action with isn't authorized to use the API. Is the user you using an Account Admin and is the AuthToken tided to that user as well?
Hey @bneporadny . Thanks for your response! That's what I thought, but I'm the account admin and I ran the token under my account...
Could you show us a screenshot of your Post URL?
Yep, @andy_starr is right. You have to use the one where you specify the account ID. I also couldn't get the global one to work.
Hi Jennifer,
Give this one a shot. I'm seeing the similar issue with the global request, but If I specify the root account it works:
https://oconee.instructure.com//api/v1/accounts/1/outcome_groups/
Thanks,
Andy
I'm working with Jennifer on this. What are you showing us? The link takes me to some output from a cmd window. Am I missing something? Our project deadline is drawing nigh
He is showing you a API POST URL example. You would also post the information like the title, description, and etc. Probably as a JSON encoded object.
Jennifer used the
...api/v1/global/outcome_groups/1/outcomes
and Andy is suggesting she change it to
...api/v1/accounts/*insert account ID here*/outcome_groups/*insert group ID here*/outcomes
Use a Get request to get the outcome_groups(ID's) for the account. I don't think you can assume it will be 1.
Then use what Andy suggested:
...api/v1/accounts/*insert account ID here*/outcome_groups/*insert group ID here*/outcomes
This is an example of loading outcomes into a Course rather than to an account.
I send a csv of course ID's to:
"/api/v1/courses/sis_course_id:$courseid/outcome_groups"
I get a result like this:
id : 9439
title : NURS 116 P723 MATERNAL-NEWBORN NURSING 8B In-Person
vendor_guid :
url : /api/v1/courses/18203/outcome_groups/9439
subgroups_url : /api/v1/courses/18203/outcome_groups/9439/subgroups
outcomes_url : /api/v1/courses/18203/outcome_groups/9439/outcomes
can_edit : True
import_url : /api/v1/courses/18203/outcome_groups/9439/import
context_id : 18203
context_type : Course
description :
Then I use that to build the API call to add the outcomes to the course.
By using the outcome_url.
/api/v1/courses/18203/outcome_groups/9439/outcomes
We are giving the Canvas Admins area a little bit of love and just want to check in with you. This will also bring this question new attention.
Were you able to find an answer to your question? I am going to go ahead and mark this question as answered because there hasn't been any more activity in a while so I assume that you have the information that you need. If you still have a question about this or if you have information that you would like to share with the community, by all means, please do come back and leave a comment. Also, if this question has been answered by one of the previous replies, please feel free to mark that answer as correct.
Robbie
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.