Previous page Next page
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Current »
Unique identifier is used to get in last frame info from archive video or to control archived stream.
Response sample:
{ "uuid": "2736652d-af5f-4107-a772-a9d78dfaa27e" }
GET http://IP-address:port/prefix/hosts/
Sample request:
GET http://127.0.0.1:80/hosts/
Sample response:
[ "SERVER1", "SERVER2" ]
GET http://IP-address:port/prefix/hosts/{NODENAME}
{NODENAME} − Server or node name on which you need to get the information.
Sample request:
GET http://127.0.0.1:80/hosts/NODE2
Sample response:
{ "nodeName": "NODE2", "domainInfo": { "domainName": "c79912ff-bb42-431c-9b2e-3adb14966f43", "domainFriendlyName": "Default" }, "platformInfo": { "hostName": "SERVER2", "machine": "x64 6", "os": "Win32" }, "licenseStatus": "OK", "timeZone": 240, "nodes": [ "NODE1", "NODE2" ] }
Parameter | Description |
---|---|
nodeName | Server/node name |
domainName | Domain ID |
domainFriendlyName | Domain name |
hostName | Host name |
machine | Server architecture |
os | OS |
licenseStatus | License type |
timeZone | Time zone in minutes (in this example, GMT+4) |
nodes | List of nodes of Domain |
GET http://IP-address:port/prefix/statistics/hardware – get information about usage of network and CP of a specific Server.
GET http://IP-address:port/prefix/statistics/hardware/domain – get information about usage of network and CP of all Servers within Domain.
Sample request:
GET http://127.0.0.1:80/statistics/hardware
Sample response:
[ { "drives": [ { "capacity": 523920994304, "freeSpace": 203887943680, "name": "C:\\" }, { "capacity": 475912990720, "freeSpace": 148696813568, "name": "D:\\" }, { "capacity": 0, "freeSpace": 0, "name": "E:\\" } ], "name": "SERVER1", "netMaxUsage": "0,0062719999999999998", "totalCPU": "16,978111368301985" } ]
Sample request:
GET http://127.0.0.1:80/product/version
Sample response:
{ "version": "C-Werk 2.0.2.25" }
Request example:
GET http://127.0.0.1:80/statistics/webserver
Response example:
{ "now": "20200601T115707.888290", "requests": 3, "requestsPerSecond": 0, "bytesOut": 134, "bytesOutPerSecond": 0, "streams": 0, "uptime": 349290 }
The returned VIDEOSOURCEID identifiers will have the format as follows "HOSTNAME/ObjectType.Id/Endpoint.Name". Friendly name and other related metadata will also be received.
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 getting a subset of the results in accordance with 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 should belong (see Get list of groups and their contents). It is possible to specify several identifiers using the separator "|". For example: http://localhost:80/camera/list?group_ids=6af92229-43ff-0347-9dae-081bf9835733|b48111eb-64c5-294c-a69c-4adb07c954d1 In this case, the response will contain all cameras that belong at least to one of the specified groups |
Sample request:
GET http://127.0.0.1:80/camera/list?filter=Server1
Sample response:
{ "cameras" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", "archives" : [], "audioStreams" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.1/SourceEndpoint.audio:0", "isActivated" : false } ], "azimuth" : "0", "camera_access" : "CAMERA_ACCESS_FULL", "comment" : "", "detectors" : [], "displayId" : "1", "displayName" : "Street", "enabled" : true, "groups" : [ "e2f20843-7ce5-d04c-8a4f-826e8b16d39c" ], "ipAddress" : "0.0.0.0", "isActivated" : true, "latitude" : "0", "longitude" : "0", "model" : "TestDevice", "offlineDetectors" : [], "panomorph" : false, "ptzs" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.1/TelemetryControl.0", "areaZoom" : false, "focus" : { "isAbsolute" : false, "isAuto" : false, "isContinous" : true, "isRelative" : false }, "iris" : { "isAbsolute" : false, "isAuto" : false, "isContinous" : true, "isRelative" : false }, "is_active" : true, "move" : { "isAbsolute" : false, "isAuto" : false, "isContinous" : true, "isRelative" : false }, "pointMove" : false, "zoom" : { "isAbsolute" : false, "isAuto" : false, "isContinous" : true, "isRelative" : false } } ], "rays" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.1/EventSupplier.ray0:0", "displayId" : "1.0.0", "displayName" : "Ray", "enabled" : true, "isActivated" : true }, { "accessPoint" : "hosts/Server1/DeviceIpint.1/EventSupplier.ray0:1", "displayId" : "1.0.1", "displayName" : "Ray", "enabled" : true, "isActivated" : true } ], "textSources" : [], "vendor" : "Virtual", "videoStreams" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0" } ] }, { "accessPoint" : "hosts/Server1/DeviceIpint.2/SourceEndpoint.video:0:0", "archives" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.2/SourceEndpoint.video:0:0", "default" : false, "incomplete" : false, "isEmbedded" : false, "storage" : "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage", "storageDisplayName" : "AliceBlue" } ], "audioStreams" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.2/SourceEndpoint.audio:0", "isActivated" : true } ], "azimuth" : "0", "camera_access" : "CAMERA_ACCESS_FULL", "comment" : "", "detectors" : [ { "accessPoint" : "hosts/Server1/AVDetector.1/EventSupplier", "displayName" : "Face detection", "events" : [ "TargetList", "faceAppeared" ], "isActivated" : false, "parentDetector" : "", "type" : "TvaFaceDetector" } ], "displayId" : "2", "displayName" : "Hall", "enabled" : true, "groups" : [ "e2f20843-7ce5-d04c-8a4f-826e8b16d39c" ], "ipAddress" : "0.0.0.0", "isActivated" : true, "latitude" : "78.2379", "longitude" : "15.4466", "model" : "Virtual several streams", "offlineDetectors" : [], "panomorph" : false, "ptzs" : [], "rays" : [], "textSources" : [], "vendor" : "Virtual", "videoStreams" : [ { "accessPoint" : "hosts/Server1/DeviceIpint.2/SourceEndpoint.video:0:0" }, { "accessPoint" : "hosts/Server1/DeviceIpint.2/SourceEndpoint.video:0:1" } ] } ], "search_meta_data" : [ { "matches" : [ 6, 7, 8, 9, 10, 11, 12 ], "score" : 0 }, { "matches" : [ 6, 7, 8, 9, 10, 11, 12 ], "score" : 0 } ] }
Parameter | Parameter description |
---|---|
archives | List of archives to which the camera is connected |
audioStreams | Audio stream |
comment | Comment |
camera_access | Access rights to the camera, where:
|
detectors | List of created detection tools |
displayId | Friendly identifier |
displayName | Name |
groups | List of groups to which the camera belongs |
ipAddress | IP address |
isActivated | True—the object is enabled, False—the object is disabled |
azimuth, latitude, longitude | The coordinates of the camera. Depending on the Server localization, the parameter values can be separated by either a period or a comma |
model | Model |
ptzs | PTZ devices, where:
|
textSources | Event sources |
vendor | Vendor |
videoStreams | Video streams |
rays | Rays |
General case:
RTSP:
Tunneling RTSP over HTTP:
{VIDEOSOURCEID} – three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
Parameter | Required | Description |
---|---|---|
w h | No | w – frame width, h – frame height. Note 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.
GET http://IP-Address:port/prefix/group
Sample request:
GET http://127.0.0.1:80/group
Sample response:
{ "groups" : [ { "Brief" : "Group1", "Description" : "", "Id" : "35fc84a0-2280-4b30-acd2-cc8419a2dc68", "groups" : [ { "Brief" : "Group2", "Description" : "", "Id" : "dac24803-313c-43ab-aa9a-276922a55cb6", "groups" : [] }, { "Brief" : "Group3", "Description" : "", "Id" : "13764152-6910-44b6-99b5-f74641ad4a14", "groups" : [ { "Brief" : "Group4", "Description" : "Group4", "Id" : "9a64e2a0-eb92-4adc-bc4f-81d30ceb6c2f", "groups" : [] } ] } ] } ] }
GET http://IP-Address:port/prefix/group/{GROUPID}.
GROUPID – value of the Id field received using the previous request.
Sample request:
GET http://127.0.0.1:80/group/9a64e2a0-eb92-4adc-bc4f-81d30ceb6c2f
Sample response:
{ "members" : [ "hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0" ] }
GET http://IP-Address:port/prefix/group/contains/{VIDEOSOURCEID}
{VIDEOSOURCEID} – three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
Sample request:
GET http://127.0.0.1:80/group/contains/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0
Sample response:
{ "groups" : [ "35fc84a0-2280-4b30-acd2-cc8419a2dc68", "13764152-6910-44b6-99b5-f74641ad4a14", "dac24803-313c-43ab-aa9a-276922a55cb6" ] }
{VIDEOSOURCEID} − three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
Statistics for the several cameras: POST http://IP-Address:port/prefix/statistics/ + request body in the following format:
[ "hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0", "hosts/SERVER1/DeviceIpint.2/SourceEndpoint.video:0:0" ]
Parameter | Required | Description |
---|---|---|
waterlevel | No | waterlevel = 1 − the response will contain the current water level value, if the water level detection is created for the camera (see Configuring Water level detection). |
Request example:
GET http://127.0.0.1:80/statistics/Server1/DeviceIpint.1/SourceEndpoint.video:0:0
Response example:
{ "bitrate": 592831, "fps": 2.278942490e+01, "width": 1280, "height": 720, "mediaType": 2, "streamType": 877088845 }
GET http://IP-Address:port/prefix/archive/list/{VIDEOSOURCEID}
{VIDEOSOURCEID} − three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
Sample request:
GET http://127.0.0.1:80/archive/list/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0
Sample response:
{ "archives" : [ { "default" : true, "name" : "hosts/SERVER1/MultimediaStorage.AliceBlue/MultimediaStorage" }, { "default" : false, "name" : "hosts/SERVER1/MultimediaStorage.AntiqueWhite/MultimediaStorage" } ] }
Parameter | Description |
---|---|
default | true − default archive. false – not a default archive. |
name | Archive name. |
GET http://IP-Address:port/prefix/archive/contents/intervals/{VIDEOSOURCEID}/{ENDTIME}/{BEGINTIME} – get archive contents starting at BEGINTIME and ending at ENDTIME.
{VIDEOSOURCEID} – three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
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 YYYYMMDDTHHMMSS format 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. |
Sample request:
GET http://127.0.0.1:80/archive/contents/intervals/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0/past/future
Sample response:
{ "intervals": [ { "begin": "20200512T105111.089000", "end": "20200521T121106.032000" }, { "begin": "20200430T052909.842000", "end": "20200430T063733.242000" } ], "more": true }
Parameter | Description |
---|---|
intervals | An array containing intervals. Note Time is returned in the UTC format. |
more | true – the server did not return all intervals because the limit was exceeded (limit parameter). false – the server returned all intervals from the specified time interval. |
GET http://IP-Aaddress:port/prefix/archive/statistics/depth/{VIDEOSOURCEID}—to get the information about the archive depth.
{VIDEOSOURCEID}—three-component source endpoint ID (see Get list of video cameras and information about them). For instance, "SERVER1/DeviceIpint.3/SourceEndpoint.video:0:0".
Parameter | Required | Description |
---|---|---|
archive | No | 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
Sample response:
{ "start": "20160823T141333.778000" ,"end": "20160824T065142" }
Sample request 2:
GET http://127.0.0.1:80/archive/statistics/depth/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0?archive=hosts/SERVER1/MultimediaStorage.AliceBlue/MultimediaStorage
Sample response:
{ "start": "20210910T070448.179000" ,"end": "20210910T072838" }
Parameter | Description |
---|---|
start | Interval start |
end | Interval end |
Sample request 3:
GET http://127.0.0.1:80/archive/statistics/depth/SERVER1/DeviceIpint.11/SourceEndpoint.video:0:1?threshold=2&archive=hosts%2FSERVER1%2FMultimediaStorage.AliceBlue%2FMultimediaStorage&bundle=archive
{ "start": "20230506T125443.056000" ,"end": "20230804T065741.643000" }
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.
Note
The ENDTIME and BEGINTIME syntax is described in Get archive contents.
Parameter | Required | Description |
---|---|---|
archive | No | 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 |
Sample request:
GET http://127.0.0.1:80/archive/statistics/capacity/SERVER1/DeviceIpint.23/SourceEndpoint.video:0:0/past/future?archive=hosts/SERVER1/MultimediaStorage.AntiqueWhite/MultimediaStorage
Sample response:
{ "size": 520093696 ,"duration": 32345 }
Parameter | Description |
---|---|
size | Archive size (in bytes) within the specified period |
duration | Archive duration (in seconds) within the specified period Attention! Since calculating the exact value is a high-runner process, the value is calculated approximately, and the margin of error may be a few percent. |
{HOSTNAME} − Server name.
Note
The ENDTIME and BEGINTIME syntax is described in Get archive contents section.
Parameter | Required | Description |
---|---|---|
archive | No | Archive name from the request to get the list of archives (see Get archive contents). |
health | No | 0 − there is an archive damage, 1 − no archive damage. |
Important!
If the request does not contain the archive or health parameters, then the response will contain all values of these parameters.
Sample request:
GET http://127.0.0.1:80/archive/health/SERVER/past/future?archive=hosts/SERVER/MultimediaStorage.AliceBlue/MultimediaStorage&health=0
Sample response:
{ "events" : [ { "data" : { "archive" : "D:/archiveAliceBlue.afs", "health" : 0 }, "timestamp" : "20180907T101637.361014" }, { "data" : { "archive" : "D:/archiveAliceBlue.afs", "health" : 0 }, "timestamp" : "20180907T102726.750134" } ] }
where,
timestamp − the time of archive damage detection (UTC +0).