Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
Using the Submissions API, "List Submissions for Multiple Assignments" is it possible to restrict the query to return submissions with a workflow_state of either 'graded' or 'submitted' in one API call? I am calling the API from a Python script using the Requests module.
I find I get no data back with workflow_state='graded,submitted' or URL Encoded version 'graded%2Csubmitted', and it seems I must either leave the parameter off and return everything or run two API calls. The Live API interactive window also seems to only allow one value or none in workflow state parameter.
Is there a way to call this API such that I get submissions with either state in one call?
/api/v1/courses/sis_course_id%3A2024-5-AB308/students/submissions?student_ids[]=all&workflow_state=graded%2Csubmitted&per_page=100
Thank you
Solved! Go to Solution.
Since the parameter doesn't have square brackets at the end of the name, it typically means that it only accepts one value. Thus, when using that endpoint you would need to make two API calls (one for each of the workflow states you want) or make a single call without using the worfklow_state parameter and then filter the results to only the ones you want.
Also, is there a reason you aren't including "pending_review" as a workflow_state to look at? This workflow state is used to indicate quizzes that have been submitted but still have questions that need to be graded by the instructor.
Since the parameter doesn't have square brackets at the end of the name, it typically means that it only accepts one value. Thus, when using that endpoint you would need to make two API calls (one for each of the workflow states you want) or make a single call without using the worfklow_state parameter and then filter the results to only the ones you want.
Also, is there a reason you aren't including "pending_review" as a workflow_state to look at? This workflow state is used to indicate quizzes that have been submitted but still have questions that need to be graded by the instructor.
Thank you @JamesSekcienski ,
In our in-house SIS we list assignment submissions that are complete and graded excluding those with hidden grades. Recently we noticed an instructor who had uploaded and graded written assignment submissions. In the API call the submissions have a status of submitted and have grades visible to students. We decided we should also show submitted status in our system if there is also a grade.
To participate in the Instructure Community, you need to sign up or log in:
Sign In