AnsweredAssumed Answered

Creating Page on course through API

Question asked by Marcus Hansson on Nov 12, 2018
Latest reply on Nov 13, 2018 by Marcus Hansson



I'm struggling with trying to create a Page on a course through the API in a C#-project. Whenever I try to post I get a response of 422 - Unprocessable Entity. I Even tried to remove all properties except "title" and yet I get the same response. 


I serialize this json-string:
   "wiki_page": {
      "title": "Title 1243"


and Post it to
new StringContent(itemtocreate,
System.Text.Encoding.Unicode, "application/json"));


I have also tried with wiki_page[titel] and not having the "wiki_page"-node at all.


Any ideas on what I might be doing wrong?