API change? Course created in wrong account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
Just a few days ago this code:
string command = "/api/v1/accounts/18/courses";
var courseData = new { name=courseName, course_format="blended", account_id= "18", start_at =startDate, ends_at=endDate};
string jsonContent = JsonConvert.SerializeObject(new { course = courseData });
var httpContent = new StringContent(jsonContent, Encoding.UTF8, "application/json");var response = await httpHelperCanvas.PostCommandAsync(command, httpContent);
was creating a course in account #18, BUT today it creates a course in account #1
Have Instructure changed something in API? Any idea what's going on?
Additionally I have tried to update new course to move it in my account:
string command = "/api/v1/courses/<NewCourseId>";
var courseData = new { account_id="18" };
string jsonContent = JsonConvert.SerializeObject(new { course = courseData });
var httpContent = new StringContent(jsonContent, Encoding.UTF8, "application/json");var response = await httpHelperCanvas.PutCommandAsync(command, httpContent)
It returns 200 but doesn't do anything.
Thank you for any input!
========================================
Apparently there was an issue with the system.
Beta had stalled on several jobs, At the end of the day everything started working, and a bunch of my "lost" courses appeared without any further actions from me.
Thank you everybody for the help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apparently there was an issue with the system.
Beta had stalled on several jobs, At the end of the day everything started working, and a bunch of my "lost" courses appeared without any further actions from me.
Thank you everybody for the help.