GET http://IP address:port/prefix/camera/list—get all available original sources (cameras) of a domain.
The returned VIDEOSOURCEID identifiers will have the format as follows "HOSTNAME/ObjectType.Id/Endpoint.Name". Friendly name and other related metadata will also be returned.
Parameter
Required
Description
limit
No
Determines the maximum number of returned results, the default value is 1000
next_page
No
The value of the nextPageToken parameter, which will be in the response if the request returns not all results. It is used to get the following values
filter
No
Allows you to get a subset of results according to the filter. Currently, it can have the HOSTNAME or VIDEOSOURCEID values
Attention!
If Office is specified as the Server name, then the GET http://IP-address:port/prefix/camera/list?filter=Office request will receive all video cameras of the Office Server.
group_ids
No
List of the group identifiers to which the cameras must belong (see Get list of groups and their contents). You can specify several identifiers using the separator "|". For example:
GET http://127.0.0.1:80/camera/list?query.query=1.Camera&query.search_type=FUZZY&search_fields=DISPLAY_NAME&decorated_name_template={display_id}.{display_name}
Parameter
Parameter description
search_type
An integer or value that specifies which search type to use. Valid values are:
0 or SUBSTRING—search by substring method (default),
1 or FUZZY—search by fuzzy method
search_fields
A list of integers or values separated by the "|" character that specifies which fields must be searched. If a match is found, subsequent fields won't be searched. Valid values are:
0 or DECORATED_NAME—search according to the template specified in the decorated_name_template field (default {display_id}.{display_name}),
1 or DISPLAY_NAME—search by name,
2 or DISPLAY_ID—search by short name,
3 or COMMENT—search by comment,
4 or ACCESS_POINT—search by access point
decorated_name_template
A template that determines how the final search string is built, based on which the search will be performed. There are keywords that can be replaced by actual device values. The keywords are:
{display_name}—camera name,
{display_id}—camera short name,
{comment}—camera comment,
{access_point}—camera access point
The default template is {display_id}.{display_name}. For example, for a device that has the "Camera" name and the short name "1", the final search string is "1.Camera"
GET http://IP-Address:port/prefix/live/media/SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0?w=1600&h=0 – high quality stream.
GET http://IP-Address:port/prefix/live/media/SERVER1/DeviceIpint.3/SourceEndpoint.video:0:1?w=1600&h=0 – low quality stream.
RTSP:
GET rtsp://login:password@IP-Address:554/hosts/SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0 – high quality stream.
GET rtsp://login:password@IP-Address:554/hosts/SERVER1/DeviceIpint.3/SourceEndpoint.video:0:1 – low quality stream.
Tunneling RTSP over HTTP:
GET rtsp://login:password@IP-Address:80/rtspproxy/hosts/SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0 – high quality stream.
GET rtsp://login:password@IP-Address:80/rtspproxy/hosts/SERVER1/DeviceIpint.3/SourceEndpoint.video:0:1 – low quality stream.
To configure tunneling in VLC set the Tunnel RTSP and RTP over HTTP checkbox (1) checked and specify the Web-Server port (2, see Configuring the Web-Server).
GET http://IP-Address:port/prefix/live/media/snapshot/{VIDEOSOURCEID}
If h and w values are more than size of original frame, the frame will be received with original size.
Zooming out of width and height is available only discretely – in 2, 4, 8 times, etc. If specified sizes are not corresponding to 1/2, 1/4 etc. of original frame size, the frame will be received with size divisible by the original frame size close to specified values.
crop_x
crop_y
crop_width
crop_height
No
crop_x – horizontal indent from the upper left corner. Possible values are 0 to 1. The default is 0.
crop_y – vertical indent from the upper left corner. Possible values are 0 to 1. The default is 0.
crop_width – the ratio of the original image width. Possible values are 0 to 1. The default is 1.
crop_height – the ratio of the original image hight. Possible values are 0 to 1. The default is 1.
Note
By default, the snapshot update period is 30 seconds. To change this value, create the NGP_SNAPSHOT_TIMEOUT system variable and set the required value in milliseconds (see Appendix 9. Creating system variable).
Sample request:
To get a snapshot in the original resolution: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0.
To get a snapshot in 640*480 resolution: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480.
To get the right lower particle of a snapshot: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?crop_x=0.5&crop_y=0.5&crop_width=0.5&crop_height=0.5.
To get the right lower particle of a snapshot in 640*480 resolution: GET http://IP-Address:port/prefix/live/media/snapshot/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480&crop_x=0.5&crop_y=0.5&crop_width=0.5&crop_height=0.5.
waterlevel = 1 − the response will contain the current water level value, if the water level detection is created for the camera (see Configuring the Water level detector).
GET http://IPaddress:port/prefix/archive/contents/intervals/{VIDEOSOURCEID}/{ENDTIME}/{BEGINTIME} – get archive contents starting at BEGINTIME and ending at ENDTIME.
If BEGINTIME is not specified, infinite future is considered. If ENDTIME is not specified too, infinite past is considered. The words "past" and "future" can be used to set infinite past and infinite future as well.
Interval sequence corresponds to the ratio between specified BEGINTIME and ENDTIME (in ascending order if BEGINTIME<ENDTIME, and in descending order if ENDTIME<BEGINTIME). Start and end points of interval are returned in its common order, i.e. the interval start time is less than the interval end time or equal to it.
Set time in the YYYYMMDDTHHMMSSformat in the timezone UTC+0.
Parameter
Required
Description
limit
No
The number of intervals in the response, the default value is 100.
scale
No
The minimum time separation between two intervals at which they will be treated as two different intervals (not merged), the default value is 0.
archive
No
The name of the archive from which the intervals are to be retrieved. If not specified, the intervals are retrieved from the default archive.
The name of the archive from the request to get the list of the archives (see Get archive contents). If not specified, the default archive is used
threshold
No
Maximum duration of the interval between records in the archive. If the interval between records exceeds the value of the threshold parameter, then the records will be considered split and a new interval will be formed. The threshold parameter is set in days, the default value is 1 day
Sample request 1:
GET http://127.0.0.1:80/archive/statistics/depth/SERVER1/DeviceIpint.23/SourceEndpoint.video:0:0
GET http://IP address:port/prefix/archive/statistics/capacity/{VIDEOSOURCEID}/{ENDTIME}/{BEGINTIME}—to get the information about the recording capacity to specific camera archive starting at BEGINTIME and ending at ENDTIME.