[Canvas Credentials] Add Sort and Date Filter Options to Assertions API Call

Problem statement:

We have been using the Credentials API to pull in assertion records nightly into a local database for advanced analytics and automated awarding of new credentials. Last night, our extract job had an issue. To reduce paging through every assertion ever awarded, we pull in only the newest records based on the created date. It appears that the "sort order" of what is coming back from the "/v2/{scope}/{entityId}/assertions" call has changed. Previously, it always returned "newest" assertion records first. Now it appears we get the "oldest" records first. We have approximately 175K assertion records since August of 2024 and that number continues to grow more and more each day. To have to pull back all records every day in order to get the newer data that we don't already have is time consuming, inefficient, and just needless strain on the Credentials system.

Proposed solution:

As an improvement to the Credentials API, include a sort filter in the API that allows one to indicate descending order to return results in order with the most recently issued badges first. In fact, it would be nice to be able to sort ascending or descending. Additionally, add a date filter to return assertions with issue date on or after a specified date. Perhaps, two filters, one for an issued at minimum date and the other for an issued at maximum date to easily limit results.

User role(s):

admin

1 Comment
nathanatkinson
Community Team
Community Team
Status changed to: Open