Why do I get error code 400 when I Post Topic to D2L?

Options
Pavel.Mazhnik2538
Pavel.Mazhnik2538 Posts: 5 🌱
edited November 2022 in Development

Url: "https://partners.brightspace.com/d2l/api/le/1.12/10593/content/modules/366347/structure/?x_a=......................."

request body (as described here):

{"Title":"123",

"ShortTitle":"",

"Type":1,

"TopicType":3,

"Url":"/d2l/common/dialogs/quickLink/quickLink.d2l?ou=10593&type=lti&rcode=04E1284B-7166-4938-B8A7-6F359D1AA5FC-195613&srcou=10593",

"StartDate":null,

"EndDate":null,

"DueDate":null,

"IsHidden":false,

"IsLocked":false,

"OpenAsExternalResource":false,

"Description":{"Text":"","Html":""},

"MajorUpdate":null,

"MajorUpdateText":"",

"ResetCompletionTracking":null,

"Duration":null} 

 

response:

{"type":"http://docs.valence.desire2learn.com/res/apiprop.html#invalid-parameters","title":"Invalid Parameters","status":400,"detail":"Request has missing or invalid parameters."}

 

The module id 366347 exists in course content. I also tried to change Description value to null, but have the same result.

Note that GET request to "https://partners.brightspace.com/d2l/api/le/1.12/10593/content/modules/366347/structure/?x_a=......................." successfully returns data with status 200 OK . Also there were no problems with POST requests to other API paths.

 

Thank you!

Tagged:

Answers