I'm new to Canvas API and am looking for the best way to create an identical copy of a course (with all content) from a master "template" course. The dates of items / submissions etc. for the original course don't matter.
What's the best way to achieve this and via which API? For my use case, the Course Import Tool via the user interface is not an option. It absolutely must be done via an API.
It sounds like you should look into using the Create Content Migration call: https://canvas.instructure.com/doc/api/content_migrations.html#method.content_migrations.create
Since you are copying all content that makes it easier to use and it looks like there is an option to remove all dates when you perform the copy, but I haven't tried that aspect of it yet.
If you are creating master "template" courses, you may also want to look into utilizing Blueprint courses in the future. https://community.canvaslms.com/t5/Video-Guide/Blueprint-Courses-Overview/ta-p/383201 There are API calls you can use with Blueprints too for associating courses and syncing content. https://canvas.instructure.com/doc/api/blueprint_courses.html