cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
martin_hall
Community Member

problem creating a new course via API

Hi 

I'm trying to create new courses via the API but I'm getting an error that indicates the course already exists. I cannot find the course if I use the UI. I've used the API to build a list of courses and the course is not in the returned list.

The list of courses incorporates the course status, but none of them are showing as deleted. When our sync successfully creates a course via the API it stores the returned ID in a local table. The table has an ID of 16000 for this course but this ID doesn't show in the list. Is it possible that courses can get created and then later deleted but still exist within Canvas as some sort of marker? 

For reference

This are the values submitted via the API

martin_hall_0-1629122716498.png

The code displays the last error obtained from the API

 

martin_hall_1-1629122774673.png

Below is a sorted excerpt from an Excel file I created by listing the courses returned from the API. The data being submitted does not appear in this file.

 

Many thanks for any help anyone can give.

 

Regards

 

-Martin Hall

 

 

 

 

 

Labels (1)
0 Kudos
1 Reply
bneporadny
Community Champion

Hi martin_hall,

The only time I've seen this is because the SIS ID was already in use in Canvas. Whether it be a course you can see or maybe a course that was previously created and then deleted. Once a SIS ID is taken it can't be used again.