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

Get assignment by integration_id

does anyone know if you can get an assignment back via the API by it's integration_id?

I have tried: https://*******/api/v1/courses/1028/assignments/integration_id:6539fcc2-27c7-49b5-beda-739472861344_...

the concept worked for me when i wanted to get a course by the sis_id URL + "sis_course_id:12345" so i was hoping integration_id would also work.

Labels (1)
3 Replies
Community Champion

IDs are either the internal Canvas ID, or one of the SIS ones: Object IDs, SIS IDs, and special IDs - Canvas LMS REST API Documentation 

Community Champion

 @aday ‌ it doesn't look like you can ask for a specific assignment by [integration_id].

It would be possible to make this call:  Assignments - List assignments

Then dump the results into a hash table where assignment.integration_id <> null, using the integration_id as the key.

At that point you can easily pull the assignment from the hash table.

If this is something you do frequently for a course, perhaps cache the results so you can more quickly cross-reference your integration_id with the Canvas assignment id.

If you are creating the assignments, perhaps create the cache as you create the assignments.

Or if you are bulk importing the assignments, create the cache during the import process.

Just ideas, hope it helps.

Community Participant

Ya, thanks that is what I did. But it would be nice if every object had a primary key and a sis_id you can query on

Sent from Nine<>