Problem creating new course

Jump to solution
Community Member

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?





1 Solution
Community Contributor

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"}}'

And this works for me.

View solution in original post