Camera Import API¶
A POST request is used to import the cameras to the following URL: http(s)://YOUR_WATCHER_URL/vsaas/api/v2/cameras/import
Console:
mydata.csv example:
Response:
{"created":2,"updated":0}
One string example:
Response:
{
{"created":2,"updated":0}
}
CSV or list of JSON objects with the following fields:
- title: camera name.
- name: stream name. Default is ‘title’ with a random suffix.
- static: 1: constantly working stream, 0: on-demand stream.
- stream_url: main stream RTSP URL.
- substream_url: secondary stream RTSP URL (for multi-bitrate). Turned off by default.
- thumbnails (string): camera snapshot URL. Send 0 instead of the URL to reset thumbnails. If you don’t know the camera snapshot URL, use 1. Watcher will turn it on automatically. Note: we recommend that you use a direct URL. Otherwise, the server load will increase at 10%. If you specify the URL, a direct communication with the camera is established, saving your server processing power.
- onvif_url: camera URL to access via the onvif protocol. By default, it’s set to ‘no.’
- onvif_profile: ONFIV profile
- ptz: (0 or 1) — turn PTZ off/on (if camera supports).
- access: camera access type (private / public / authorized). Public will be accessible to all users, private — to a camera owner only. Private is a default value.
- owner: camera owner login.
- enabled: (0 or 1) turns camera on / off.
- dvr_path: path to save the archive. Default is no archive.
- dvr_depth: (integer in days) — number of days to store the archive. 0 — disables the archive.
- coordinates:geographical coordinates.
- postal_address: camera’s postal address.
- comment: camera comment.
- agent_model (string): camera model.
- agent_serial (string): camera serial number.
- agent_id (string): camera agent unique number.
- agent_key (string): special field used for Watcher authorization.
- agent_pin (string): special field used for Watcher authorization.