Problem creating new course
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024
06:27 AM
hello and good day,
I am tying to create a course by APIs in my locally installation! but the problem is I pass all parameters but in the result my course name is 'Unnamed course' !! and it can't pass my parameters to save! what is my problem?
Thanks.
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024
07:54 AM
Thanks, that makes it easier to see what's going wrong, I think your JSON isn't correctly structured, it should be something like:
{"course": {"name": "curl created"}}
Here is an example request using the curl command line tool (authentication header removed) that created a correctly named course:
ccurl -H 'content-type: application/json' --data '{"course": {"name": "curl created"}}' https://instance.instructure.com/api/v1/accounts/1/courses
And this works for me.