REST API /Scheduler/SaveSchedule

In the unlikely ;) event you encounter a bug, tell us here
Post Reply
smiffy1989
Posts: 9
Joined: Wed Jun 25, 2014 9:54 pm

REST API /Scheduler/SaveSchedule

Post by smiffy1989 » Wed Dec 23, 2015 5:21 pm

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

smiffy1989
Posts: 9
Joined: Wed Jun 25, 2014 9:54 pm

Re: REST API /Scheduler/SaveSchedule

Post by smiffy1989 » Wed Dec 23, 2015 5:52 pm

Sods/Murphys law... as soon as you ask you figure it out. So Arguments in rules are string arrays, not strings :)

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests