Course Update failing

20 views
Skip to first unread message

Matthew Drover

unread,
Oct 17, 2014, 10:39:40 AM10/17/14
to valenc...@googlegroups.com
I'm using the call: PUT /d2l/api/lp/(version)/courses/(orgUnitId)

with the data 

{
	"Name": MattDemo,
	"Code": matt_demo,
	"StartDate": ,
	"EndDate": ,
	"IsActive": 0
}

I keep getting a 400 error. I am doing a GET to populate all fields except the IsActive, which is what I'm updating.

Any ideas?

Matthew Drover

unread,
Oct 20, 2014, 7:03:18 AM10/20/14
to valenc...@googlegroups.com
Seems it was the way I was passing a null value to the start/end dates.

In another post it is suggested to retrieve the course offering first and use its data to build the json block to activate/deactivate. If the start/end dates are not set they need to be passed as 'null' as the empty string returned from valence won't work.

Desire2Learn Staff: Sarah-Beth

unread,
Oct 20, 2014, 9:30:52 AM10/20/14
to valenc...@googlegroups.com
Thanks for reporting back with the solution, Matthew. Glad you got things up and running.
Reply all
Reply to author
Forward
0 new messages