Showing results for 
Search instead for 
Did you mean: 
Community Member

Problems with using User-Generated API Key to access upcoming unsubmitted assignments.

Hello, I am new to the Canvas API. I'm using a non-developer key to access my assignments for each of my courses. I'm having issues with limitations with bucket types for the List Assignments function - where I can only either return unsubmitted or upcoming assignments. I'm avoiding pagination in the interest of speed, so the bucket is important because I want everything in a single request. I can't seem to find a way for Canvas to give me a list of both upcoming and unsubmitted assignments. Additionally, when I run it with the upcoming bucket and attempt to run though each item and check their submission values, they are sometimes inconsistent with my own profile - it appears to be returning objects for other students. So it seems like there's no way for me to do this with only one request. Can anyone help me with this issue? Am I missing something? Thank you!

0 Kudos
1 Reply
Community Champion

You should be able to use the List Assignments for User endpoint to get all assignments relevant to your user, regardless of status. If you're trying to reduce API calls, add the `per_page=100` param to get as many as you can at once. I would also include the `submissions` parameter (see here for all available) because then you can filter yourself for assignments with or without a submission already.

There are some other threads in the Developers forum about the buckets behaving inconsistently, so I tend to use this manual approach. It's a pain to filter, but it's more consistent for my use cases.