how to get the student enrolled course status through REST API call using access token

suresh_n
Community Novice

Hi Guys

i am trying this feature to get the workflow_state":"completed",  in progressions.json for the student course

Canvas LMS includes a REST API for accessing and modifying data externally from the main application, in your own programs and scripts. This documentation describes the resources that make up the API.

when i try to access

https://yourcompany.instructure.com/courses/yourcourseID/modules/progressions.json?user_id=studentId...

if you don't login to Canvas system in the browser,following error coming

{"status":"unauthenticated","errors":[{"message":"user authorization required"}]}

if i logged in to canvas in browser, try the above url in another tab following is appearing

while(1);[{"context_module_progression":{"id":289,"context_module_id":31,"user_id":72,"requirements_met":[{"id":240,"type":"must_view"},{"id":245,"type":"must_mark_done"},{"id":260,"type":"must_mark_done"},{"id":241,"type":"must_mark_done"},{"id":242,"type":"must_mark_done"},{"id":262,"type":"must_mark_done"},{"id":243,"type":"must_mark_done"},{"id":244,"type":"must_mark_done"},{"id":246,"type":"must_mark_done"},{"id":248,"type":"must_mark_done"},{"id":249,"type":"must_mark_done"},{"id":250,"type":"must_mark_done"},{"id":251,"type":"must_mark_done"},{"id":252,"type":"must_mark_done"},{"id":253,"type":"must_view"},{"id":258,"type":"must_submit"},{"id":259,"type":"must_view"}],"workflow_state":"completed","created_at":"2016-04-12T01:14:44Z","updated_at":"2016-05-10T23:39:39Z","collapsed":null,"current_position":16,"completed_at":"2016-05-10T23:39:39Z","current":true,"lock_version":87,"evaluated_at":"2016-05-10T23:39:38Z","incomplete_requirements":[]}}]

without logging to the canvas if i access other urls like below  they work fine

https://yourcompany.instructure.com/api/v1/users/userId/enrollments?state[]=active&access_token=uraccesstokenHIb9viyj3Oq2MtgQ4sXL3UllLdKB0KpJTp5po

Thanks & Regards

Suresh Nimmakayala

0 Likes