Page 1 of 1

Api add monitor

Posted: Thu Apr 08, 2021 8:29 am
by Cramac1
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