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

Observees' Grades

Jump to solution

How can I view observee's grades through the API?  Please advise.  

Labels (1)
Tags (3)
1 Solution

Accepted Solutions
llawson
Community Contributor

First, you would need to extract the Canvas IDs the observer is observing. A PowerShell snippet would look something like:

$ids = Invoke-RestMethod "https://school.instructure.com/api/v1/users/:canvas_id_of_observer/observees" -method get -headers @{"Authorization"="Bearer $auth"} | % {$_.id}

Foreach ($i in $ids) {
    invoke-restmethod "https://school.instructure.com/api/v1/users/$i/enrollments" -method get -headers @{"Authorization"="Bearer $auth"} | % { $_.grades }
}‍‍‍‍‍

View solution in original post

1 Reply
llawson
Community Contributor

First, you would need to extract the Canvas IDs the observer is observing. A PowerShell snippet would look something like:

$ids = Invoke-RestMethod "https://school.instructure.com/api/v1/users/:canvas_id_of_observer/observees" -method get -headers @{"Authorization"="Bearer $auth"} | % {$_.id}

Foreach ($i in $ids) {
    invoke-restmethod "https://school.instructure.com/api/v1/users/$i/enrollments" -method get -headers @{"Authorization"="Bearer $auth"} | % { $_.grades }
}‍‍‍‍‍

View solution in original post