Alex
Alex

Reputation: 13

Is there a way to GET lists of course work for ALL courses in one request (Method: courses.courseWork.list Google Classroom API)

Is there a way to GET lists of course work for ALL courses in one request (Method: courses.courseWork.list Google Classroom API). Right now, it works only by one single courseId per request Thank you

function execute() {
return gapi.client.classroom.courses.courseWork.list({
"courseId": "7777777777777",
"courseWorkStates": [
"PUBLISHED"
]
})

Upvotes: 1

Views: 496

Answers (1)

Lorena Gomez
Lorena Gomez

Reputation: 2203

It is not possible, it needs the 'courseId' parameter to return the data. A workaround would be listing all the courses with 'Method: courses.list' [1], get the Id's for all courses and create a cycle so it gets the course work for all courses.

[1] https://developers.google.com/classroom/reference/rest/v1/courses/list

Upvotes: 1

Related Questions