Page 1 of 1

REST API /Scheduler/SaveSchedule

Posted: Wed Dec 23, 2015 5:21 pm
by smiffy1989
I'm trying to save a schedule posting this (as an example):

Code: Select all

{
	"Name": "Indiana Jones and the Last Crusade",
	"KeepUntilMode": 0,
	"ChannelType": 0,
	"RecordingFileFormatId": null,
	"IsOneTime": true,
	"Version": 1,
	"IsActive": true,
	"Rules": [{
		"Type": "Channels",
		"Argument": "991bff68-d8b4-4960-9e32-4e365d5df1bc"
	}, {
		"Type": "TitleEquals",
		"Argument": "Indiana Jones and the Last Crusade"
	}],
	"Id": 0,
	"KeepUntilValue": null,
	"PreRecordSeconds": null,
	"PostRecordSeconds": null,
	"SchedulePriority": 0,
	"ScheduleType": 82,
	"ScheduleId": "00000000-0000-0000-0000-000000000000",
	"ProcessingCommands": [

	]
}
But I keep getting this back:

Code: Select all

{"detail":"Object reference not set to an instance of an object."}
I can't figure it out, can anyone point out any problems with my JSON?

Thanks

Re: REST API /Scheduler/SaveSchedule

Posted: Wed Dec 23, 2015 5:52 pm
by smiffy1989
Sods/Murphys law... as soon as you ask you figure it out. So Arguments in rules are string arrays, not strings :)