Get list of video cameras and information about them
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"
If no parameters are specified in the request, then the video will be received in the MJPEG format.
You can't get audio in MJPEG format.
Parameter
Required
Description
format
No
Parameter values are "mp4", "hls".
Video can be received in the original format (without recompression) via HLS protocols. HLS protocol supports only H.264 format.
The "mp4" player allows to receive the original video in H.264 and H.265 formats. In all other cases the Server recompresses it to MJPEG format
Attention!
If video is requested in the format that differs from the original one, then recompression will be performed, therefore, Server load will increase.
w, h
No
w—frame width, h—frame height
Attention!
The mp4 video is transferred without scaling.
If the h and w values are greater than the size of the original video, the video will be received with the 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 video size, the video will be received with size divisible by the original video size close to specified values.
fr
No
The FPS value
Attention!
This parameter is relevant only for MJPEG video.
enable_token_auth
No
Get authorized and signed links to video streams:
enable_token_auth—enable authorization by token = 1.
valid_token_hours—signature validation time (in hours). The maximum value is a week. The default value is 12 hours
valid_token_hours
No
key_frames
No
1—playback only by key frames;
0—original frame rate (default)
authToken
No
Connecting via AxxonNet.
For example, https://axxonnet.com/arpserver/25455_0/webclient/live/media/SERVER/DeviceIpint.1/SourceEndpoint.video:0:1?authToken=...
auth_token
No
Authorizing when connecting directly to the Server and authorizing by token.
For example, http://127.0.0.1:80/live/media/SERVER/DeviceIpint.1/SourceEndpoint.video:0:0?format=mp4&auth_token=...
Sample request:
GET http://127.0.0.1:80/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?w=640&h=480&enable_token_auth=1&valid_token_hours=1
HLS video
HLS protocol video can be received in the original format only. The following parameters are used when receiving HLS protocol video:
Parameter
Required
Description
keep_alive
No
Time in seconds in which the stream is to be kept alive
hls_time
No
The segment length in seconds
hls_list_size
No
The maximum number of playlist entries. If set to 0, the list file will contain all segments
hls_wrap
No
The number after which the segment filename number wraps. If set to 0, the number will be never wrapped
Sample request:
GET http://127.0.0.1:80/live/media/SERVER1/DeviceIpint.23/SourceEndpoint.video:0:0?format=hls&keep_alive=60
Time in seconds in which the stream is to be kept alive
keep_alive_url
The url to keep the stream alive
stop_url
The url to stop the stream
stream_url
The url to access the list of segments
Attention!
HLS protocol video becomes available with some delay (about 20 seconds). This is due to a feature of the HLS protocol: after receiving the link, it forms a cache of several video segments, and only after that the video starts playing.
To playback video via HLS protocol, use the stream_url parameter from the response as follows:
RTSP protocol video is sent in the original format only.
Request to get the structure of the RTSP link: http://login:password@IPAddress:Port/live/media/Server1/DeviceIpint.23/SourceEndpoint.video:0:0?format=rtsp
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).