Home / Docs Center / GB28181 API Reference / PTZ Control

PTZ Control

GB28181 API Reference · General

Project: GB28181 API Documentation | page_id: 171

Brief Description
  • PTZ control
Request URL
  • /api/gb28181/control
Request Method
  • POST
Parameters
Parameter Required Type Description
id Yes string Device number
channel Yes string Channel number index
ptzcmd No string Control command (reference: A.3 front-end device control protocol)
cmd No string Control command
speed No Number Movement speed (1- 10)
pos No Number Preset (1-10)
Response Example
  {
    "code": 0,
    "msg": "",
  }
Response Parameter Description
Parameter Type Description
code int Error code, >0 means error
msg int Error message
Control Command cmd Description
cmd Value
stop Stop
right Move right
left Move left
up Move up
down Move down
leftUp Upper left
leftDown Lower left
rightUp Upper right
rightDown Lower right
zoomFar Lens zoom in
zoomNear Lens zoom out
apertureFar Aperture decrease
apertureNear Aperture increase
focusFar Focus near
focusNear Focus far
setPos Set preset
calPos Call preset
delPos Delete preset
Notes
  • Example: /api/gb28181/control?id=43000000801320000045&channel=0&ptzcmd=A50F01017D000033
  • /api/gb28181/control?id=43000000801320000045&channel=0&cmd=left&speed=5&pos=1
  • Versions after 1.7.7 support cmd, speed and pos. ptzcmd can be ignored.
Didn't find what you need?Contact us,Talk to our engineers directly.

Request a Quote

Fill in the form and we will get back with a quote and proposal within 1 business day.

Click "Generate inquiry email" to open your mail client with the body pre-filled. If no mail client is configured, click "Copy" and paste it into webmail — recipient: sunshiyang@xstrive.com.