Invalid parameters attempting to update existing course's end date
I am attempting to update an existing course using the test tool to verify how my data should look for my API. I can't get the update to work with even the minimum data required, and I'm not sure why.
When using the following request for my 'aspentest.desire2learn.com'
/d2l/api/lp/1.24/courses/6724
and the following JSON:
{
"Name": "Introduction to Economics",
"Code": "SBS190",
"IsActive": false
}
I am getting an invalid parameter response:
{
"type": "http://docs.valence.desire2learn.com/res/apiprop.html#invalid-parameters",
"title": "Invalid Parameters",
"status": 400,
"detail": "Request has missing or invalid parameters."
}
Answers
-
After a bit of trial and error I figured out that despite some values being nullable, you still need to provide them in the request JSON.
I was missing StartDate and EndDate in the request.
-
Hi @Nathan MacDonald - Thanks for this information! Based on your findings, I've authored a Community Knowledge Base Article.