Api add monitor

Forum for questions and support relating to 1.35.x development only.
Post Reply
Cramac1
Posts: 76
Joined: Wed Aug 29, 2018 11:29 am

Api add monitor

Post by Cramac1 » Thu Apr 08, 2021 8:29 am

Hello.
add monitor:

Code: Select all

	$data="Monitor[Name]=dmf-".$tmp."&Monitor[Function]=Record&Monitor[Type]=Ffmpeg&Monitor[ServerId]=4&Monitor[StorageId]=2&Monitor[Path]=rtsp://".$list[0]["login"].":".$list[0]["password"]."@".$list[0]["ip"]."/Streaming/channels/1&Monitor[Method]=Tcp&Monitor[Colours]=4&Monitor[Width]=1920&Monitor[Height]=1080&Monitor[SaveJPEGs]=0&Monitor[VideoWriter]=2";
	$result = CallAPIzm($zmurl,'POST', 'zm/api/monitors.json?token='.$token, $data);

but I get the error:

Code: Select all

{ ["message"]=> array(1) { ["OutputCodec"]=> array(2) { [0]=> string(69) "Please choose one of the following values : H264, Mjpeg, Mpeg1, Mpeg2" [1]=> string(69) "Please choose one of the following values : H264, Mjpeg, Mpeg1, Mpeg2" } } } 
before updates, it worked, now I will not select a value for the field

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests