Use API to Copy specific Assignments from one course to multiple courses

Community Explorer

Hi Everyone - i'm a definite API novice and I'm hoping someone might be able to give me some tips.

I have used Postman in the past to bulk migrate a source course into multiple courses using a simple POST URL with a "course" variable and a CSV with the list of the Canvas IDs for the destination courses. 

What I want to do this time is a little more involved. I would like to copy one specific assignment into multiple other courses. But ideally set this up so I could use "assignment ID" and "destination id" variables to do this en masse for several different assignment that will go into multiple courses. 

For a better illustration, let's say in a single source course I have a whole bunch of assignments, each one corresponding with a different academic course. 

MATH 101  - Final Exam (Canvas Assignment ID: 0000001)
MATH 201 - Final Exam (Canvas Assignment ID: 0000002)

We use a 1-to-1 courses/sections setup at our campus, so let's say for the Fall 23 term there are three separate course shells for each:

Fall23 MATH 101 #34567 (Canvas Course ID: 987654)
Fall23 MATH 101 #34568 (Canvas Course ID: 876543)
Fall23 MATH 101 #34569 (Canvas Course ID: 765432)
Fall23 MATH 201 #34570 (Canvas Course ID: 654321)
Fall23 MATH 201 #34571 (Canvas Course ID:  543210)
Fall23 MATH 201 #34572 (Canvas Course ID: 432109)

My hope is that I can create a POST function that will copy Assignment ID 0000001 into the first three courses, and so on.  So i Imagine the data CSV would end up look something like:

assignment_id, destination_course_id
0000001, 987654
0000001, 876543
0000001, 765432
0000002, 654321
0000002, 543210
0000002, 432109

However, I can't seem to find any info about how to create a command to actually process this. 

Would love any thoughts or ideas or resources that might help. Thanks so much!