canvas api create module item Discussion getting content not found (but SubHeader works fine)

Jump to solution
mgibson2
Community Explorer

Hi Im making this call to api

https://k12com.instructure.com/api/v1/courses/589/modules/2454/items?module_item[title]=titlesilly&m...

and getting back 

{"message":"Could not find content"}

Which seems to be the catchall error. 

If I do https://k12com.instructure.com/api/v1/courses/589/modules/2454/items?module_item[title]=titlesilly&m... it works fine - so the ids in there work. (Ive have that course id and Ive create the module 2454)

Also fails if I take out completion requirement still fails. So it seems like the Discussion type is not flying - is there other params I should be using? Am I doing something wrong? The docs list "Discussion" as a valid type : https://canvas.instructure.com/doc/api/modules.html#method.context_module_items_api.create

 

Thanks for your help Mark Gibson

 

Labels (1)
0 Likes
2 Solutions

Did you already create a Discussion?  When trying to link a Discussion to a Module, I think the Discussion already needs to exist so that you can get the id of the Discussion to then use in the API call.

View solution in original post

0 Likes

yea finally figured it out - needed to create a DiscussionTopic - is there some tutorial that makes these kind of things clear? how one has to wire things? if there is I havent found it yet - having same issues with File/Dropbox

View solution in original post

0 Likes