Developer documentation

8min
we are currently working on a rest api, for now these are basic commands you can implement using the bluecherry api to control or view a camera requires knowing the device id currently this can be found in the xml file note the xml file will only generate the device ids that the user has access to make sure you have access to all cameras, or that you are using an administrator login if you plan on controlling all cameras by default the web port is 7001 (configurable in apache settings) and the rtsp port is 7002 https //login\ password\@bluecherry server 7001/ajax/devices php?xml=true\&short=true live viewing rtsp (tcp) connection rtsp\ //login\ password\@bluecherry server 7002/live/$deviceid return multi part jpeg (mjpeg) https //login\ password\@bluecherry server 7001/media/mjpeg php?id={camera id}\&multipart=true return single image (jpeg) obtain one image from the server https //login\ password\@bluecherry server 7001/media/mjpeg php?id={camera id} controlling ptz cameras below is a example url for controlling a pan / tilt / zoom camera through the bluecherry api https //login\ password\@bluecherry server/media/ptz php?id={camera id}\&command={command}\&panspeed={speed}\&tiltspeed={speed}\&pan={pan command}\&tilt={tilt command}\&zoom={zoom command}\&duration={duration}\&preset={preset id}\&name={preset name} supported pan / tilt / zoom commands query – display xml with camera information/ptz capabilities and presets move – pan/tilt/zoom using parameters stop – stop movement save – save present rename – rename a preset go – go to specified preset clear – clear preset pan / tilt / zoom variables preset id – id of the preset preset name –new preset name speed pan/tilt speed pan command (l)eft /right tilt command (u)p /(d)own zoom command (t)ight /(w)ide duration\ for how long to execute command; 1 for continuous trigger recordings https //login\ password\@bluecherry server 7001/media/trigger php?camera id={camera id}\&description=test camera must be set to trigger (‘t’) in the recording schedule description will show in the logs that a trigger was recording with the description you inserted