Preface

Thank you very much for using our company's products. We will be happy to provide you with the best and highest quality service.

This manual may contain technical inaccuracies or text errors.

The content of this manual will be updated regularly without notice; the updated content will be added to the new version of this manual.

The interface images extracted from this manual are only used as examples. The interface may vary between versions, so please refer to the actual interface for accuracy.

We have a professional support team to answer your questions. Thank you for your support.


Version update description

Version | Date | Describe
r14 | 2022/05/31 | r14Version Update


Interface Description

Content Overview

The interface of this document adopts a RESTful architecture. RESTful interfaces are simple stateless protocols based on HTTP, with four request methods: GET, POST, PUT, and DELETE. HTTP returns are all in JSON formatHTTP can be used for debugging, but HTTPS is recommended for actual production environments.For the convenience of subsequent examples, HTTP is used. If HTTPS is used instead, just replace the corresponding http with https.


Common terms

Source: Single-channel video sources such as RTSP, RTMP, and ONVIF, or channels automatically generated after adding devices, are also referred to as sources. Sources and monitoring points are equivalent.

Device:The camera NVR or third-party platform adds devices through the SDK or protocol of each manufacturer's device. After adding devices, one or more sources are generated, which correspond to different channels.


Protocol format

HTTP GET returns in JSON format. The specific JSON format varies depending on the command. The following table shows basic formats and examples. To make it easier for you to understand, some commands directly use representative values in their descriptions.The requests and responses for HTTP POST, PUT, and DELETE methods are also in JSON format.

Format

Request : http://server/api/v1/<resources>/$1?para=xxx

&<…>=<…>

Response:

{

"code": xxxxx,

"msg": xxxxxx,

"result": "xxxxxx"

}

<…>=<…>Represents multiple request parameters.

Example

http://192.168.100.127:8085/api/v1/DevPartition/List?pageSize=100

Response:

{

"code": 0,

"msg": "Success",

"result": [

{

"devPartitionId": 10000,

"uuid": "60c01e5f-18cc-4bd2-afa8-d94b36109820",

"enableGB": false,

"parentId": 0,

"devPartitionName": "Root",

"description": "",

"disOrder": 0,

"dev": [],

"casDev": []

}

]

}

Simple return format

Please contact internal personnel or technical support.

Field | Data type | Describe
code | int | Returned status code
msg | string | Specific description of API success or failure


API Debugging

Postman debugging

The API provides a Postman debugging project that can be downloaded with the corresponding project and environment. First download the Postman tool. The following reference image is based on Postman 9.26.8. If you are using a newer version, it may differ. You can refer to the method for importing projects and environments in the new version.

Download Postman project

Please contact internal personnel

Import Project

Click Import under Collections, and then select USC Security Software.postman_collection.json to import it into Postman. Refer to the following figure:

Import Environment

Click Import under Environments, and then select USC ENV HTTP.postman_environment.json to import it into Postman. Refer to the following figure:

Select the same method as USC ENV HTTPS.postman_environment.json.

Test

After importing, you can select the corresponding API and modify the IP and port of the H5STREAM ENV HTTP, and then you can test it.

You can fill the access_token obtained by Login into the access_token field in the environment, so that subsequent tests can use this access_token.

The postman project has added the function of automatically setting the access_token. After calling Login once, the access_token in the environment variable will be updated, so there is no need to manually set it.

Since the session obtained by Login has a validity period, you can use the Runner function to keep it alive periodically by filling the valid session into the h5_session field in the environment.


API authentication mechanism

The video platform uses an access_token-based management mechanism. If you use the Login API to obtain an access_token, then all API calls use that access_token. The access_token has a timeout period, and you can use Keepalive to keep the access_token alive so that it does not time out. The default timeout period for the access_token is 1800 seconds. Refer to the following figure for usage:


系统(System)

System

The system API includes login and other system-related APIs.


UserDataFormat

Data Format Description

The meaning of the JSON data format for organization can refer to the following table:

Name | Type | Description
userId | int | User's ID
uuid | string | User's UUID
username | string | User name
firstName | string | Internal field
lastName | string | Internal field
avatar | string | Internal field
email | string | Internal field
roleId | int | Role ID
groupid | int | Organizational ID
description | string | User description
enabled | bool | Internal field
passwordChangeTimes | int | Password modification times
acronym | string | Internal field
background | string | Internal field
lastPasswordChangeTime | string | The last password modification time
password_expiry | bool | Whether the password has expired
createdAt | string | Internal field
updatedAt | string | Internal field

Examples

{

  "userId": 10002,

  "uuid": "f22d6687-1045-4b00-af54-a63ed8932e0a",

  "username": "uscuser1",

  "firstName": "FirstName",

  "lastName": "LastName",

  "avatar": "",

  "email": "001@example.com",

  "roleId": 10000,

  "groupId": 10000,

  "description": "",

  "enabled": true,

  "passwordChangeTimes": 0,

  "acronym": "u",

  "background": "#6CA508",

  "lastPasswordChangeTime": "2024-08-14T13:54:50.9862443+08:00",

  "password_expiry": false,

  "createdAt": "2024-08-14T13:54:51.0902182+08:00",

  "updatedAt": "2024-08-14T13:54:51.0902182+08:00"

   }


User Login

Description

Login system interface. Other interfaces rely on the session returned by Login. For specific mechanisms, refer to Interface Description-》API Authentication Mechanism.

Usage

Request parameters | POST
URL | /api/v1/Login
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
user | string | must | User name
password | string | must | MD5 password. The www/tool.html in the release package can generate the corresponding MD5

Response

Name | Type | Description
code | int | 0 indicates success, 13001 indicates an incorrect account or password, and 13000 indicates an account lockout
msg | string | Specific description success or failure
access_token | string | The access_token obtained during successful login
token_type | string | Bearer indicates that the authentication type needs to be used in the request header
weak_password | bool | Whether the password is weak or not. If it is weak, it is recommended to refer to the requirements of the management interface to change it to a strong password
password_first_login_channel | bool | If true, the password needs to be modified
password_expire_time_in_day | int | How long does the password expire
expire | string | access_token expiration time
remainingCount | int | When the remaining login error times are 0, the account is locked
tLockTimeResidue | int | Remaining lock time

Examples

POST http://192.168.100.127:8085/api/v1/Login

{

  "username": "admin",

  "password": "e28efe9291262da0bd40675e4df289d40",

}

Returned message

{

  "code": 0,

  "msg": "success",

  "result": {,

   "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjMxOTM1MjAsImlkZW50aXR5IjoxMDAwMSwianRpIjoiY2U1YzJiYjgtYWRjNi00NDUxLTgwNDQtMDVmNzU2MWM3MDA2IiwibmFtZSI6IlVzZXIxIiwib3JpZ19pYXQiOjE3MjMxOTE3MjAsInJvbGVpZCI6MTAwMDAsInJvbGVuYW1lIjoiQWRtaW5pc3RyYXRvciJ9.r0HBrUKPLRo-SR_C9Gm14Z-xp6mpyrsRs76sgZHp4Wk",

}

   "token_type": "Bearer",

   "weak_password": false,

   "password_first_login_change": true,

   "password_expire_time_in_day": 30,

   "expire": "2024-08-09T16:52:00+08:00"


User Addition

Description

Add User

Usage

Request parameters | POST
URL | /api/v1/User/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
username | string | must | User name
password | string | must | md5 password
firstName | string | optional | Internal field
lastName | string | optional | Internal field
roleId | int | must | Role ID
avatar | string | optional | Internal field
email | string | optional | Internal field
groupId | int | must | Organizational ID
description | string | optional | User description
enabled | bool | optional | Internal field

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/User/Item

{

  "username": "uscuser1",

  "password": "e28efe9291262da0bd40675e4df289d4",

   "firstName": "FirstName",

   "lastName": "LastName",

   "roleId": 10000,

   "avatar": "",

   "email": "001@example.com",

   "groupId": 10000,

   "description": "",

   "enabled": true,

}

Returned message

{

  "code": 0,

  "msg": "success"


User Information Acquisition

Description

Get user information

Usage

Request parameters | GET
URL | /api/v1/User/Item
data | none

Parameters

Name | Type | Parameter mandatory | Description
username | string | must | User name

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | obj | Refer to the user data format

Examples

GET http://192.168.100.127:8085/api/v1/User/Item?username=user

Returned message

{

  "code": 0,

  "msg": "success",

  "result": {,

   "userId": 10000,

  "uuid": "b9f173a4-095d-46e5-b0a0-f884daffd4ee",

  "username": "admin",

  "firstName": "",

  "lastName": "",

   "avatar": "",

   "email": "",

   "roleId": 10000,

   "groupId": 10000,

   "description": "",

   "enabled": true,

   "passwordChangeTimes": 1,

   "acronym": "A",

   "background": "#284A52",

   "lastPasswordChangeTime": "2024-08-12T09:15:00.515868+08:00",

   "password_expiry": false,

   "createdAt": "2024-08-12T09:10:58.918626+08:00",

   "updatedAt": "2024-08-13T09:10:51.339099+08:00"


User Update

Description

Update users

Usage

Request parameters | PUT
URL | /api/v1/User/Item/&1
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
username | string | must | User name
roleId | int | must | Role ID
avatar | string | optional | Internal field
email | string | optional | Internal field
groupId | int | must | Organizational ID
description | string | optional | User description
enabled | bool | optional | Internal field

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/User/Item/10001

{

  "username": zk,

  "roleId": 10000,

  "avatar": "",

   "email": "zzz@163.com",

  "groupId": 10000,

  "description": "",

  "enabled": true

}

Returned message

{

  "code": 0,

   "msg": "Success"


User Deletion

Description

Delete user

Usage

Request parameters | DELETE
URL | /api/v1/User/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | User ID to be deleted

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/User/Item

{

  "ids": [10002],

}

Returned message

{

  "code": 0,

   "msg": "Success"


Change Password

Description

Change Password

Usage

Request parameters | PUT
URL | /api/v1/User/Password/Set
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
username | string | must | The username to be modified
newPassword | string | must | md5 password
oldPassword | string | must | md5 password

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/User/Password/Set

{

  "username": "admin",

   "newPassword": "e28efe9291262da0bd40675e4df289d4",

   "oldPassword": "e28efe9291262da0bd40675e4df289d41",

}

Returned message

{

  "code": 0,

   "msg": "Success"


Obtaining The User List

Description

Get the user list

Usage

Request parameters | GET
URL | /api/v1/User/List
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
pageSize | int | optional | Number of data per page Default 10
pageIndex | int | optional | Page default first page

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
count | int | How many data are there in total
pageSize | int | How many data per page
pageIndex | int | What page is it
list | array | Refer to the user data format

Examples

PUT http://192.168.100.127:8085/api/v1/User/List

Returned message

{

  "code": 0,

   "msg": "Success"

  "result": {,

  "count": 4,

  "pageIndex": 1,

  "pageSize": 1,

 "list": [

{

      "userId": 10000,

      "uuid": "a40dbea0-ce0c-42c5-b641-e280372540de",

      "username": "admin",

      "firstName": "",

      "lastName": "",

      "avatar": "",

      "email": "",

      "roleId": 10000,

      "groupId": 10000,

      "description": "",

      "enabled": true,

      "passwordChangeTimes": 1,

      "acronym": "A",

      "background": "#82006C",

      "lastPasswordChangeTime": "2024-08-07T09:40:29.758153+08:00",

      "password_expiry": false,

      "createdAt": "2024-08-07T09:39:19.733981+08:00",

      "updatedAt": "2024-08-14T15:03:41.15321+08:00"

       }

    ]


Get Session

Description

Get session

Usage

Request parameters | GET
URL | /api/v1/User/LoginSession
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
session | string | Session obtained during success
expire | string | session expiration time

Examples

GET http://192.168.100.127:8085/api/v1/User/LoginSession

Returned message

{

  "code": 0,

   "msg": "Success",

  "result": {

   "session": "f43d443a-a1c9-453b-9b1d-7dec1eb312d4",

   "expire": "2024-08-13T16:03:51+08:00"


User Stay Alive

Description

The access_token obtained through keep-alive login must be called before the access_token expires. For specific mechanisms, refer to Interface Description-》API Authentication Mechanism.

Usage

Request parameters | GET
URL | /api/v1/User/Keepalive
data | 无

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
expire | string | session expiration time

Examples

GET http://192.168.100.127:8085/api/v1/User/Keepalive

Returned message

{

  "code": 0,

   "msg": "Success",

   "result": {,

   "expire": "2024-08-13T16:21:06+08:00"


User Profile

Data Format

key | Default value | Description
LiveViewProtocol | WS | Real-time video protocol
PlaybackProtocol | WS2 | Playback video protocol
WatermarkContent | watermark | Watermark content
WatermarkStatus | false | Watermark switch
RTCEngine | v1 | RTC engine
DeviceDisable | false | Show hidden
PictureQuality | true | Image quality selection
VideoBackgroundBlack | #222222 | Black theme video background color
VideoBackgroundWhite | #494A4B | White theme video background color
VideoBackgroundDarkblue | #202731 | Dark blue theme video background color
VideoAspectRatio | true | Maintain aspect ratio
Theme | black | Theme
WebclientAutoLogoutTime | 15 | Automatic logout time of web client
WebclientAutoLogoutTimeEnable | false | Enable automatic logout of the web client
BufferTime | 0 | Cache time
H264CPUDecode | false | H264 CPU decoding
MapCluster | false | Map aggregation

Description

Get user configuration information

Usage

Request parameters | GET
URL | /api/v1/UserConfig/Item
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Reference data format

Examples

GET http://192.168.100.127:8085/api/v1/UserConfig/Item

Returned message

{

  "code": 0,

   "msg": "Success",

   "result": [

   {

    "id": 1,

    "key": "LiveViewProtocol",

    "value": "WS",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 2,

    "key": "PlaybackProtocol",

    "value": "WS2",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

    },

    {

    "id": 3,

    "key": "WatermarkContent",

    "value": "watermark",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 4,

    "key": "WatermarkStatus",

    "value": "false",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 5,

    "key": "RTCEngine",

    "value": "v1",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 6,

    "key": "DeviceDisable",

    "value": "false",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 7,

    "key": "PictureQuality",

    "value": "true",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 8,

    "key": "VideoBackgroundBlack",

    "value": "#222222",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 9,

    "key": "VideoBackgroundWhite",

    "value": "#494A4B",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 10,

    "key": "VideoBackgroundDarkblue",

    "value": "#202731",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 11,

    "key": "VideoAspectRatio",

    "value": "true",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 12,

    "key": "Theme",

    "value": "black",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 13,

    "key": "WebclientAutoLogoutTime",

    "value": "15",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 14,

    "key": "WebclientAutoLogoutTimeEnable",

    "value": "false",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 15,

    "key": "BufferTime",

    "value": "0",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 16,

    "key": "H264CPUDecode",

    "value": "false",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   },

   {

    "id": 17,

    "key": "MapCluster",

    "value": "false",

    "createdAt": "2024-08-07T09:39:19.736187+08:00",

    "updatedAt": "2024-08-07T09:39:19.736187+08:00"

   }

 ]


Update User Configuration

Description

Update user configuration

Usage

Request parameters | PUT
URL | /api/v1/UserConfig/Item
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/UserConfig/Item

{

  "key":"LiveViewProtocol",

  "value":"ws"

}

Returned message

{

  "code": 0,

   "msg": "Success"


Organization Data Format

Data Format Description

The meaning of the organization json data format can be referred to in the following table:

Name | Type | Description
groupId | int | Organizational ID
uuid | string | Organizational uuid
parentId | string | The superior organization ID is 0, indicating that there is no superior
groupName | string | Organization Name
description | string | Internal field
roleId | int | Role ID
role | obj | Reference Role

Examples

{

      "groupId": 10000,

      "uuid": "c7f13870-fdbe-4920-a404-8698069209cd",

      "parentId": 0,

      "groupName": "Root",

      "description": "",

      "roleId": 10000,

      "role": {

          "roleId": 10000,

          "uuid": "f3c43af2-8cbc-4c9f-9ef3-916e58cc1412",

          "name": "Administrator",

          "description": "Administrator role",

          "passwordLength": 6,

          "userLockTime": 600,

          "userLockLimit": 3,

          "userLockTimeAgain": 20,

          "passwordExpiryTime": 30,

          "passwordAlertTime": 7,

          "passwordExpiryChange": true,

          "passwordRule": true,

          "passwordFirstChange": true,

          "devPartition": null,

          "funcGroup": null,

          "createdAt": "2024-08-12T09:10:56.333215+08:00",

          "updatedAt": "2024-08-12T09:10:56.333215+08:00"

        },

      "createdAt": "2024-08-12T09:10:56.435096+08:00",

      "updatedAt": "2024-08-12T09:10:56.435096+08:00",

      "children": null


Add Organization

Description

Add organization

Usage

Request parameters | POST
URL | /api/v1/Group/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
parentId | int | must | Superior ID
roleId | int | must | Role ID
description | string | optional | Organizational description
groupName | string | must | Organization Name

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Group/Item

{

  "parentId": 10000,

  "roleId": 10000,

  "description": "G1 Description",

  "groupName": "G1"

}

Returned message

{

  "code": 0,

  "msg": "Success",


Organizational Acquisition

Description

Get Organization

Usage

Request parameters | GET
URL | /api/v1/Group/Item/$1
data | Get Organization

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | obj | Reference organization data format

Examples

GET http://192.168.100.127:8085/api/v1/Group/Item/1000

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "groupId": 10000,

      "uuid": "c7f13870-fdbe-4920-a404-8698069209cd",

      "parentId": 0,

      "groupName": "Root",

      "description": "",

      "roleId": 10000,

      "role": {

          "roleId": 10000,

          "uuid": "f3c43af2-8cbc-4c9f-9ef3-916e58cc1412",

          "name": "Administrator",

          "description": "Administrator role",

          "passwordLength": 6,

          "userLockTime": 600,

          "userLockLimit": 3,

          "userLockTimeAgain": 20,

          "passwordExpiryTime": 30,

          "passwordAlertTime": 7,

          "passwordExpiryChange": true,

          "passwordRule": true,

          "passwordFirstChange": true,

          "devPartition": null,

          "funcGroup": null,

          "createdAt": "2024-08-12T09:10:56.333215+08:00",

          "updatedAt": "2024-08-12T09:10:56.333215+08:00"

       },

      "createdAt": "2024-08-12T09:10:56.435096+08:00",

      "updatedAt": "2024-08-12T09:10:56.435096+08:00",

      "children": null


Organization Renewal

Description

Update Organization

Usage

Request parameters | PUT
URL | /api/v1/Group/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
parentId | int | must | Superior ID
roleId | int | must | Role ID
description | string | must | Organizational description
groupName | string | must | Organization Name

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Group/Item

{

  "parentId": 0,

  "roleId": 10000,

  "description": "group description",

  "groupName": "group1"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Organizational Deletion

Description

Delete organization

Usage

Request parameters | DELETE
URL | /api/v1/Group/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Organizational ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Group/Item

{

  "ids":[10001]

}

Returned message

{

  "code": 0,

  "msg": "Success",


Obtain The Organization List

Description

Get Organization

Usage

Request parameters | GET
URL | /api/v1/Group/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Reference organization data format

Examples

GET http://192.168.100.127:8085/api/v1/Group/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

       {

          "groupId": 10000,

          "uuid": "faf013e9-c97d-45e0-ae2c-d171104544e8",

          "parentId": 0,

          "groupName": "Root",

          "description": "",

          "roleId": 10000,

          "role": {

              "roleId": 10000,

              "uuid": "2bcd3c4d-373d-47c2-91f5-8bff26406333",

              "name": "Administrator",

              "description": "Administrator role",

              "passwordLength": 6,

              "userLockTime": 600,

              "userLockLimit": 3,

              "userLockTimeAgain": 20,

              "passwordExpiryTime": 30,

              "passwordAlertTime": 7,

              "passwordExpiryChange": true,

              "passwordRule": true,

              "passwordFirstChange": true,

              "devPartition": null,

              "funcGroup": null,

              "createdAt": "2024-08-07T09:39:19.316917+08:00",

              "updatedAt": "2024-08-07T09:39:19.316917+08:00"

           },

          "createdAt": "2024-08-07T09:39:19.372466+08:00",

          "updatedAt": "2024-08-07T09:39:19.372466+08:00",

          "children": [

               {

                  "groupId": 10001,

                  "uuid": "8ced28c2-b755-4423-b778-0ba482e76dba",

                  "parentId": 10000,

                  "groupName": "G1",

                  "description": "G1 Description",

                  "roleId": 10000,

                  "role": {

                      "roleId": 10000,

                      "uuid": "2bcd3c4d-373d-47c2-91f5-8bff26406333",

                      "name": "Administrator",

                      "description": "Administrator role",

                      "passwordLength": 6,

                      "userLockTime": 600,

                      "userLockLimit": 3,

                      "userLockTimeAgain": 20,

                      "passwordExpiryTime": 30,

                      "passwordAlertTime": 7,

                      "passwordExpiryChange": true,

                      "passwordRule": true,

                      "passwordFirstChange": true,

                      "devPartition": null,

                      "funcGroup": null,

                      "createdAt": "2024-08-07T09:39:19.316917+08:00",

                      "updatedAt": "2024-08-07T09:39:19.316917+08:00"

                   },

                  "createdAt": "2024-08-14T15:49:10.167422+08:00",

                  "updatedAt": "0001-01-01T00:00:00Z",

                  "children": []

               }

           ]

       }

   ]


Roles

Description

Roles

Usage

Request parameters | none
URL | none
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
roleId | int | Role ID
uuid | string | Role uuid
name | string | Name
description | string | Role description
passwordLength | int | Minimum password length
userLockTime | int | Account lockout duration (unit: second)
userLockLimit | int | Account lockout
userLockTimeAgain | int | Time period for account re-locking (unit: minute)
passwordExpiryTime | int | Password expiration time (unit: day)
passwordAlertTime | int | Password expiration reminder time (unit: day)
passwordExpiryChange | bool | Password expiration forced modification
passwordRule | bool | Enable account password validity rules
passwordFirstChange | bool | First login to change password
devPartition | array | Refer to the data format of equipment partition
funcGroup | array | Reference permission list data format


Role Addition

Description

Add role

Usage

Request parameters | POST
URL | /api/v1/Role/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
roleName | string | must | Name
description | string | optional | Role description
funcGroupIds | array | must | Internal field
devPartitionIds | array | must | Device partition id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Role/Item

{

  "roleName": "operator1",

  "description": "Administrator role",

  "funcGroupIds": [],

  "devPartitionIds": []

}

Returned message

{

  "code": 0,

  "msg": "Success",


Role Acquisition

Description

Get role

Usage

Request parameters | GET
URL | /api/v1/Role/Item/$1
data | none

Parameters

Name | Type | Parameter mandatory | Description
&1 | int | must | Role ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | object | Reference role data format

Examples

GET http://192.168.100.127:8085/api/v1/Role/Item/10001

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "roleId": 10001,

      "uuid": "124fcd02-1e4e-4250-bf4b-8698a92ebd7b",

      "name": "operator",

      "description": "operator role",

      "passwordLength": 6,

      "userLockTime": 600,

      "userLockLimit": 3,

      "userLockTimeAgain": 20,

      "passwordExpiryTime": 30,

      "passwordAlertTime": 7,

      "passwordExpiryChange": true,

      "passwordRule": true,

      "passwordFirstChange": false,

      "devPartition": [

           {

              "devPartitionId": 10000,

              "uuid": "79971bb0-126b-419d-abf0-8f7066d47873",

              "enableGB": false,

              "parentId": 0,

              "devPartitionName": "Root",

              "description": "",

              "disOrder": 0,

              "dev": null,

              "casDev": null,

              "map": null,

              "view": null,

              "accessDev": null,

              "createdAt": "2024-08-07T09:39:20.112366+08:00",

              "updatedAt": "2024-08-15T14:48:20.943597+08:00",

              "children": null

           }

       ],

      "funcGroup": [],

      "createdAt": "2024-08-15T14:14:04.985919+08:00",

      "updatedAt": "2024-08-15T14:48:20.936757+08:00"


Role Update

Description

Update Role

Usage

Request parameters | PUT
URL | /api/v1/Role/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
roleName | string | must | Name
description | string | optional | Role description
funcGroupIds | array | must | Permission ID
devPartitionIds | array | must | Device partition id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Role/Item

{

  "roleName": "operator1",

  "description": "Administrator role",

  "funcGroupIds": [],

  "devPartitionIds": []

}

Returned message

{

  "code": 0,

  "msg": "Success"


Role Deletion

Description

Remove role

Usage

Request parameters | PUT
URL | /api/v1/Role/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Role ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETEhttp://192.168.100.127:8085/api/v1/Role/Item

{

  "ids":[10003]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Role List Acquisition

Description

Get the list of roles

Usage

Request parameters | GET
URL | /api/v1/Role/Item/$1
data | none

Parameters

Name | Type | Parameter mandatory | Description
pageSize | int | optional | Number of data per page: 10 by default
pageIndex | int | optional | Page default first page

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
count | int | How many data are there in total
pageSize | int | How many data per page
pageIndex | int | What page is it
list | array | Reference role data format

Examples

GET http://192.168.100.127:8085/api/v1/Role/List?pageSize=100

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 3,

      "pageIndex": 1,

      "pageSize": 100,

      "list": [

           {

              "roleId": 10000,

              "uuid": "2bcd3c4d-373d-47c2-91f5-8bff26406333",

              "name": "Administrator",

              "description": "Administrator role",

              "passwordLength": 6,

              "userLockTime": 600,

              "userLockLimit": 3,

              "userLockTimeAgain": 20,

              "passwordExpiryTime": 30,

              "passwordAlertTime": 7,

              "passwordExpiryChange": true,

              "passwordRule": true,

              "passwordFirstChange": true,

              "devPartition": null,

              "funcGroup": null,

              "createdAt": "2024-08-07T09:39:19.316917+08:00",

              "updatedAt": "2024-08-07T09:39:19.316917+08:00"

           }

       ]


Role Configuration Update

Description

Update role configuration

Usage

Request parameters | PUT
URL | /api/v1/Role/Config/10000
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
passwordLength | int | must | Minimum password length
userLockTime | int | must | Account lockout duration (unit: second)
userLockLimit | int | must | Account lockout
userLockTimeAgain | int | must | Time for account to be locked again (unit: minute)
passwordExpiryTime | int | must | Password expiration time (unit: day)
passwordAlertTime | int | must | Password expiration reminder time (unit: day)
passwordExpiryChange | bool | must | Password expiration and mandatory modification
passwordRule | bool | must | Enable the account password validity rule
passwordFirstChange | bool | must | First login to change password

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Role/Config/10000

{

  "passwordLength":5,

  "userLockTime": 600,

  "userLockLimit": 3,

  "userLockTimeAgain": 20,

  "passwordExpiryTime":30,

  "passwordAlertTime": 7,

  "passwordExpiryChange": true,

  "passwordRule": true,

  "passwordFirstChange":false

}Returned message

{

  "code": 0,

  "msg": "Success"


Data Format Of Equipment Partition

Data format description

Name | Type | Description
devPartitionId | int | Device partition id
uuid | string | Device partition UUID
enableGB | bool | Internal field
description | string | Equipment partition description
parentId | int | Superior equipment partition id
devPartitionName | string | Name of equipment partition
disOrder | int | Internal field
dev | object | Refer to the equipment data format
casDev | object | Reference cascade device data format
map | object | Reference map data format
view | object | Reference view data format
accessDev | object | Refer to the data format of access control equipment
createdAt | string | Internal field
updatedAt | string | Internal field
children | object | Lower level data


Add Device Partition

Description

Add device partition

Usage

Request parameters | POST
URL | /api/v1/DevPartition/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
parentId | int | must | Superior device partition id
description | string | optional | Description of equipment partition
devPartitionName | string | must | Name of equipment partition

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/DevPartition/Item

{

  "parentId": 10000,

  "description": "G1 Description",

  "devPartitionName": "G1"

}Returned message

{

  "code": 0,

  "msg": "Success"


Device Partition Acquisition

Description

Get device partition

Usage

Request parameters | GET
URL | /api/v1/DevPartition/Item/$1
data | none

Parameters

Name | Type | Parameter mandatory | Description
&1 | int | must | Device partition id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | object | Refer to the data format of the device partition

Examples

GET http://192.168.100.127:8085/api/v1/DevPartition/Item/10001

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "devPartitionId": 10000,

      "uuid": "f4d1380a-1c5a-462c-8b88-36c6166c8cfe",

      "enableGB": false,

      "parentId": 0,

      "devPartitionName": "Root",

      "description": "",

      "disOrder": 0,

      "dev": [],

      "casDev": [],

      "map": [],

      "view": [],

      "accessDev": [],

      "createdAt": "2024-08-15T17:10:15.116645+08:00",

      "updatedAt": "2024-08-15T17:16:46.458873+08:00",

      "children": null


Device Partition Update

Description

Update device partition

Usage

Request parameters | PUT
URL | /api/v1/DevPartition/Item/$1
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
parentId | int | must | Superior device partition id
description | string | optional | Description of equipment partition
devPartitionName | string | must | Name of equipment partition

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/DevPartition/Item/1000

{

  "parentId": 10000,

  "description": "Root sdfsdf",

  "devPartitionName": "Root"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Device Partition

Description

Delete device partition

Usage

Request parameters | DELETE
URL | /api/v1/DevPartition/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Device partition id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/DevPartition/Item

{

  "ids":[10003]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Obtaining The List Of Device Partitions

Description

Get the device partition list

Usage

Request parameters | GET
URL | /api/v1/DevPartition/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Device partition data format

Examples

GET http://192.168.100.127:8085/api/v1/DevPartition/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

       {

          "devPartitionId": 10000,

          "uuid": "f4d1380a-1c5a-462c-8b88-36c6166c8cfe",

          "enableGB": false,

          "parentId": 0,

          "devPartitionName": "Root",

          "description": "",

          "disOrder": 0,

          "dev": [],

          "casDev": [],

          "map": [],

          "view": [],

          "accessDev": [],

          "createdAt": "2024-08-15T17:10:15.116645+08:00",

          "updatedAt": "2024-08-16T09:37:08.157722+08:00",

          "children": []

       }

   ]


Equipment Partition Moving Position

Description

Equipment partition movement location

Usage

Request parameters | PUT
URL | /api/v1/DevPartition/Move
data | none

Parameters

Name | Type | Parameter mandatory | Description
origDevPartitionId | int | must | Partition ID of the mobile device
toDevPartitionId | int | must | Partition ID of the mobile device

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/DevPartition/Move?origDevPartitionId=10002&toDevPartitionId=10004

Returned message

{

  "code": 0,

  "msg": "Success"


Logical Partition Data Format

Data format description

Name | Type | Description
id | int | Logical partition ID
uuid | string | Logical partition uuid
enableGB | bool | Internal field
description | string | Logical partition description
parentId | int | Superior logical partition ID 0 represents the current root node
logicPartitionName | string | Logical partition name
disOrder | int | Internal field
channel | object | Reference channel data format
createdAt | string | Internal field
updatedAt | string | Internal field
children | object | Lower level data


Logical Partition Addition

Description

Add logical partition

Usage

Request parameters | POST
URL | /api/v1/LogicPartition/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
parentId | int | must | Superior logical partition ID
description | string | optional | Logical partition description
logicPartitionName | string | must | Logical partition name
channel | array | must | The token of the channel

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/LogicPartition/Item

{

  "parentId":0 ,

  "description": "G1 Description",

  "logicPartitionName": "zl" ,

  "channel":["30ad200f-1a06-412b-9c9a-25f5c66beed2--34"]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Logical Partition Retrieval

Description

Get logical partition

Usage

Request parameters | GET
URL | /api/v1/LogicPartition/Item/$1
data | none

Parameters

Name | Type | Parameter mandatory | Description
&1 | int | must | Logical partition id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | object | Refer to the logical partition data format

Examples

GET http://192.168.100.127:8085/api/v1/DevPartition/Item/10000

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "id": 10000,

      "uuid": "e0983f32-91bb-425d-b2bb-0a974a6c6bbb",

      "enableGB": false,

      "parentId": 0,

      "logicPartitionName": "zl",

      "description": "G1 Description",

      "disOrder": 1,

      "channel": [

           {

              "uuid": "5ce2d2f7-ad9e-4107-a08e-d9d5f4ffe24d",

              "token": "5b60a901-d136-4b07-867a-05db00673039--36",

              "chanNo": 4,

              "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

              "devChannel": "36",

              "parentToken": "5b60a901-d136-4b07-867a-05db00673039",

              "rootParent": "5b60a901-d136-4b07-867a-05db00673039",

              "name": "114",

              "type": "H5_CH_DEV",

              "enabled": true,

              "metaEnabled": false,

              "idle": false,

              "online": true,

              "recording": false,

              "description": "",

              "dome": false,

              "alias": "",

              "longitude": "",

              "latitude": "",

              "chanType": "USC_CHAN_CAMERA",

              "setting": {

                  "schedRecEnable": false,

                  "schedRecTemplate": "",

                  "manualRecEnable": false

               },

              "createdAt": "2024-08-16T11:21:25.331055+08:00",

              "updatedAt": "2024-08-16T11:21:25.427189+08:00"

           }

       ],

      "createdAt": "2024-08-16T11:20:26.799358+08:00",

      "updatedAt": "2024-08-16T11:24:17.653984+08:00",

      "children": null


Logical Partition Update

Description

Update logical partition

Usage

Request parameters | PUT
URL | /api/v1/LogicPartition/Item/$1
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
parentId | int | must | Parent logical partition id
description | string | optional | Logical partition description
logicPartitionName | string | must | Logical partition name
channel | array | must | Channel token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/LogicPartition/Item/1000

{

  "parentId":0,

  "description": "G1 Description",

  "logicPartitionName": "G2" ,

  "channel":["30ad200f-1a06-412b-9c9a-25f5c66beed2--35"]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Logical Partition Deletion

Description

Delete logical partition

Usage

Request parameters | DELETE
URL | /api/v1/LogicPartition/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Logical partition id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/LogicPartition/Item

{

  "ids":[10000]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Obtaining The List Of Logical Partitions

Description

Get the list of logical partitions

Usage

Request parameters | GET
URL | /api/v1/LogicPartition/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Logical partition data format

Examples

GET http://192.168.100.127:8085/api/v1/LogicPartition/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

       {

          "id": 10000,

          "uuid": "e0983f32-91bb-425d-b2bb-0a974a6c6bbb",

          "enableGB": false,

          "parentId": 0,

          "logicPartitionName": "G2",

          "description": "G1 Description",

          "disOrder": 1,

          "channel": [],

          "createdAt": "2024-08-16T11:20:26.799358+08:00",

          "updatedAt": "2024-08-16T11:36:03.150527+08:00",

          "children": []

       }

   ]


Logical Partition Move Location

Description

Logical partition move location

Usage

Request parameters | PUT
URL | /api/v1/LogicPartition/Move
data | none

Parameters

Name | Type | Parameter mandatory | Description
origLogicPartitionId | int | must | The logical backup partition ID of the mobile device
toLogicPartitionId | int | must | Logical partition id of the move

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/LogicPartition/Move?origLogicPartitionId=10002&toLogicPartitionId=10004

Returned message

{

  "code": 0,

  "msg": "Success"


Maintenance

Operation Log

Get operation logs

Usage

Request parameters | POST
URL | /api/v1/UscLog/List
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
username | string | optional | User name
beginTime | string | must | Start time
endTime | string | must | End time
moduleType | string | optional | Module type
pageSize | int | optional | How many data per page? 10 by default
pageIndex | int | optional | Page default to the first page

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
count | int | How many data are there in total
pageSize | int | How many data per page
pageIndex | int | What page is it
id | int | Log ID
username | string | User name
clientIp | string | Client IP
logLevel | string | Log level
logCode | string | Status code
time | string | Time
moduleType | string | Module type
operation | string | Operation
OperateResult | string | Operation result
createdAt | string | Internal field
updatedAt | string | Internal field

Examples

POST http://192.168.100.127:8085/api/v1/UscLog/List

{

  "username": "admin",

  "beginTime": "2023-08-16T00:00:00+08:00",

  "endTime": "2024-08-16T23:59:59+08:00",

  "moduleType": "login_manage",

  "pageSize": 1,

  "pageIndex": 1

}

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 12,

      "pageIndex": 1,

      "pageSize": 1,

      "list": [

           {

              "id": 1,

              "username": "admin",

              "clientIp": "::1",

              "logLevel": "informational",

              "logCode": 0,

              "time": "2024-08-15T17:10:59+08:00",

              "moduleType": "login_manage",

              "operation": "login",

              "OperateResult": "success",

              "createdAt": "2024-08-15T17:11:00.045133+08:00",

              "updatedAt": "2024-08-15T17:11:00.045133+08:00"

           }

       ]


Translate

Description

Obtain the translated document

Usage

Request parameters | GET
URL | /api/v1/Languages/GetLanguages
data | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Languages/GetLanguages

Returned message

{

  "code": 0,

  "msg": "Success"


System Configuration Acquisition

Description

Get system configuration

Usage

Request parameters | GET
URL | /api/v1/SysConfig/Item
data | none

Parameters

Name | Type | Parameter mandatory | Description
module | string | optional | Module type
pageSize | int | optional | How many data per page Default 10
pageIndex | int | optional | Page default first page

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
count | int | How many data are there in total
pageSize | int | How many data per page
pageIndex | int | What page is it
id | int | System configuration id
key | string | Parameter Name
value | string | Parameter values
rebootServer | string | Need to restart the service
module | string | Module type
description | string | System configuration description
parameter_range | string | Value range limitation
updatedAt | string | Internal field
createdAt | string | Internal field

Examples

GET http://192.168.100.127:8085/api/v1/SysConfig/Item?module=system&pageSize=1&pageIndex=1

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 3,

      "pageIndex": 1,

      "pageSize": 1,

      "list": [

           {

              "id": 1,

              "module": "system",

              "rebootServer": true,

              "key": "LogRetentionTime",

              "value": "365",

              "description": "Log retention days",

              "parameter_range": ">1",

              "createdAt": "2024-08-15T17:10:14.162751+08:00",

              "updatedAt": "2024-08-15T17:10:14.162751+08:00"

           }

       ]


System Configuration Modification

Description

Modify the system configuration

Usage

Request parameters | PUT
URL | /api/v1/SysConfig/Item
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
key | string | must | Parameter Name
value | string | must | Parameter values

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/SysConfig/Item

{

  "key":"LogRetentionTime",

  "value":"365"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Custom Theme Icon

Description

Customize lcon

Usage

Request parameters | POST
URL | /api/v1/Customization/Icon
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
logoBase64 | string | must | Icon's base64 code

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Customization/Icon

{

“logoBase64”:”Base64 code of the image”

}

Returned message

{

  "code": 0,

  "msg": "Success"


LoginLogo

Description

Customize Login Logo

Usage

Request parameters | POST
URL | /api/v1/Customization/LoginLogo
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
logoBase64 | string | must | Icon's base64 code
language | string | must | Language

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Customization/LoginLogo

{

"language":"Zh",

“logoBase64”:”Base64 code of the image”

}

Returned message

{

  "code": 0,

  "msg": "Success"


Logo

Description

Custom Logo

Usage

Request parameters | POST
URL | /api/v1/Customization/Logo
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
logoBase64 | string | must | Icon's base64 code
language | string | must | Language
ThemeColors | string | must | Theme color

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Customization/Logo

{

"language":"Zh",

"ThemeColors":"white",

“logoBase64”:”Base64 code of the image”

}

Returned message

{

  "code": 0,

  "msg": "Success"


Title

Description

Custom Title

Usage

Request parameters | POST
URL | /api/v1/Customization/Title
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
title | string | must | title content
language | string | must | Language

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Title

{

  "language":"Zh",

  "title":"USC unified security|WEB"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Copyright

Description

Custom Copyright

Usage

Request parameters | POST
URL | /api/v1/Customization/Copyright
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
copyright | string | must | The content of copyright

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Copyright

{

  "copyright":"2024 © linkingvision.com"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Reset Icon

Description

Reset Icon

Usage

Request parameters | GET
URL | /api/v1/Customization/Restore/Icon
data | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Restore/Icon

Returned message

{

  "code": 0,

  "msg": "Success"


Reset LoginLogo

Description

Reset LoginLogo

Usage

Request parameters | GET
URL | /api/v1/Customization/Restore/LoginLogo
data | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Restore/LoginLogo

Returned message

{

  "code": 0,

  "msg": "Success"


Reset Logo

Description

Reset Logo

Usage

Request parameters | GET
URL | /api/v1/Customization/Restore/Logo
data | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Restore/Logo

Returned message

{

  "code": 0,

  "msg": "Success"


Reset Title

Description

Reset Title

Usage

Request parameters | GET
URL | /api/v1/Customization/Restore/Title
data | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Restore/Title

Returned message

{

  "code": 0,

  "msg": "Success"


Reset Copyright

Description

Reset Copyright

Usage

Request parameters | GET
URL | /api/v1/Customization/Restore/Copyright
data | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Customization/Restore/Copyright

Returned message

{

  "code": 0,

  "msg": "Success"


Data Format Of Access Device

Name | Type | Description
accessDevId | int | Access device ID
devPartitionId | int | Device partition ID
uuid | string | Access device uuid
type | string | Access device type
nodeId | string | Server ID
protocol | string | Protocol http/https
ip | string | IP address of access device
port | string | Port of access device
accessToken | string | Authentication code
enabled | bool | Is it enabled
online | bool | Is it online
description | string | Description of access device
accessController | string | Access control controller information


Get Access Device List

Description

Get Access Device List.

Usage

Request parameters | GET
URL | /api/v1/AccessDevice/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
pageSize | int | How many pieces of data per page
pageIndex | int | What page is it
list | object | Reference access device list

Examples

GET http://192.168.100.127:8085/api/v1/AccessDevice/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 1,

      "pageIndex": 1,

      "pageSize": 10,

      "list": [

           {

              "accessDevId": 5,

              "devPartitionId": 10000,

              "uuid": "1091d94a-8034-4740-b4e0-3101723f4dcb",

              "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

              "type": "ZK6000",

              "name": "Access1",

              "protocol": "https",

              "ip": "192.168.100.170",

              "port": "8098",

              "accessToken": "BBA43ED398E1FB8AD4573E4E7491BE8D",

              "enabled": false,

              "online": true,

              "description": "AccessDevice description",

              "accessController": null,

              "createdAt": "2024-09-10T17:27:22.047038+08:00",

              "updatedAt": "2024-09-10T17:27:22.169103+08:00"

           }

       ]


Get Access Device

Description

Get Access Device.

Usage

Request parameters | GET
URL | /api/v1/AccessDevice/&1
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | object | Reference access device list

Examples

GET http://192.168.100.127:8085/api/v1/AccessDevice/1

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "accessDevId": 6,

      "devPartitionId": 10000,

      "uuid": "8a1233e6-ff41-4697-8e70-910509d65ad2",

      "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

      "type": "ZK6000",

      "name": "Access1",

      "protocol": "https",

      "ip": "192.168.100.170",

      "port": "8098",

      "accessToken": "BBA43ED398E1FB8AD4573E4E7491BE8D",

      "enabled": false,

      "online": true,

      "description": "AccessDevice description",

      "accessController": [

           {

              "accessControllerId": 4,

              "accessDevId": 6,

              "uuid": "f2b97370-255f-4667-ab8f-5321515a1ccc",

              "token": "4028e42a9154d3330191550dc3e20015",

              "name": "192.168.100.205",

              "sn": "AK6L222760133",

              "type": "K2-200",

              "online": true,

              "module": "acc",

              "Doors": [

                   {

                      "id": 7,

                      "controllerId": 4,

                      "uuid": "1f443ec9-da5d-4866-8dee-7634e0e46a78",

                      "token": "4028e42a9154d3330191550dc43d004d",

                      "name": "192.168.100.205-1",

                      "controlUUID": "4028e42a9154d3330191550dc3e20015",

                      "connect": "0",

                      "sensor": "0",

                      "alarm": "0",

                      "relay": "0",

                      "Readers": [

                           {

                              "id": 25,

                              "DoorId": 7,

                              "doorUUID": "4028e42a9154d3330191550dc43d004d",

                              "uuid": "fda3b562-8bf5-47cb-83f9-02ea9cbf0e44",

                              "token": "4028e42a9154d3330191550dc43e004f",

                              "name": "192.168.100.205-1-入",

                              "readerNo": 1,

                              "readerState": 0

                           },

                           {

                              "id": 26,

                              "DoorId": 7,

                              "doorUUID": "4028e42a9154d3330191550dc43d004d",

                              "uuid": "5cc2397d-f453-4f73-9794-aba8f661bdf5",

                              "token": "4028e42a9154d3330191550dc43e0050",

                              "name": "192.168.100.205-1-出",

                              "readerNo": 2,

                              "readerState": 1

                           }

                       ]

                   },


Add Access Device

Description

Add Access Device.

Usage

Request parameters | POST
URL | /api/v1/AccessDevice
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
devPartitionId | int | must | Device partition ID
type | string | must | Access device type
name | string | must | Name
protocol | string | must | Protocol http/https
ip | string | must | Access device ip
port | string | must | Port of access device
accessToken | string | must | Authentication code
description | string | must | Description of access device

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/AccessDevice

{

  "devPartitionId": 10000,

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "type":"ZK6000",

  "name": "zk6000",

  "protocol":"https",

  "ip": "192.168.100.170",

  "port":"8098",

  "accessToken": "BBA43ED398E1FB8AD4573E4E7491BE8D",

  "description": "description"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Modify Access Device

Description

Modify Access Device.

Usage

Request parameters | PUT
URL | /api/v1/AccessDevice
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
accessDevId | int | must | Access device ID
devPartitionId | int | must | Device partition ID
name | string | must | Name
protocol | string | must | Protocol http/https
ip | string | must | Access device ip
port | string | must | Port of access device
accessToken | string | must | Authentication code
description | string | must | Description of access device

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/AccessDevice

{

  "accessDevId":2,

  "devPartitionId": 10000,

  "name": "zk60020",

  "protocol":"https",

  "ip": "192.168.100.130",

  "port":"8098",

  "accessToken": "E8B12C9A59279819027C3E2E70D921AE",

  "description": "description"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Access Device

Description

Delete Access Device.

Usage

Request parameters | DELETE
URL | /api/v1/accessdevice
data | application/json;charset=utf-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Access device ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/AccessDevice

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Remote Door Opening

Description

Remote Door Opening.

Usage

Request parameters | POST
URL | /api/v1/AccessDevice/RemoteOpenDoor
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
doorUUID | string | must | Door uuid
accessToken | string | must | Authentication code
interval | int | must | Opening time

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/AccessDevice/RemoteOpenDoor

{

  "doorToken": "4028e42a9154d3330191550dc43e004e",

  "accessToken": "B7836547237FA0B936E8F046D32B56D0",

  "interval": 5

}

Returned message

{

  "code": 0,

  "msg": "Success"


Remote Door Closing

Description

Remote Door Closing.

Usage

Request parameters | POST
URL | /api/v1/AccessDevice/RemoteCloseDoor
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
doorUUID | string | must | Door uuid
accessToken | string | must | Authentication code

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/AccessDevice/RemoteCloseDoor

{

  "doorToken": "402870818fa87244018fa87f9b0907223",

  "accessToken": "17D8F99B56B90856D8E60BEA2FE14D90"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Device Data Format

The device contains one or more video sources (also known as channels). The type of video source generated by the device is H5_CH_DEV. The data for a single device is in the json data format. nType indicates the type of video source. The types can be referenced in the following table:

Type | Description
H5_DEV_HIK | Hikvision Device SDK
H5_DEV_DH | Dahua Device SDK
H5_DEV_UNV | UNV Device SDK
H5_DEV_HIKINFOV | Hikvision INFO Vision Platform
H5_DEV_HIKISC | Hikvision ISC platform
H5_DEV_TD | Tiandy Device SDK
H5_DEV_DHDSS | Dahua DSS platform
H5_DEV_IVS | Huawei IVS
H5_DEV_RTSP | RTSP
H5_DEV_ONVIF | ONVIF
H5_DEV_FILE | File

The meaning of the video source json data format can be referred to in the following table:

Name | Type | Description
devPartitionId | int | Set partition device id
nodeId | string | Server ID
setToken | bool | Modify token
name | string | Device name
token | string | The device token is the unique identifier of the device
username | string | User name
password | string | Password
devIP | string | Device IP address
devPort | string | Device port
enableAudio | bool | Whether to enable audio
maxChannel | int | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded
centralRecord | bool | Whether it is a central video recording, Hikvision ISC and Hikvision INFO Vision are applicable
sandbox | bool | Whether to enable Sandbox mode
isApi | bool | Whether to enable ISAPI mode, applicable to Hikvision device SDK
VMS | bool | Whether it is VMS, applicable to VMS of Uniview, and when false, it is Uniview NVR
online | bool | Whether the equipment is online
description | string | Device description


Add Dh Device

Description

Add Dahua SDK device

Usage

Request parameters | POST
URL | /api/v1/Device/Add/Dh
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to enable audio
description | string | must | Device Description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
subEvent | bool | optional | Whether to enable event subscription
apiPort | int | optional | API port
apiHttps | bool | optional | Whether to enable https
maxChannel | int | optional | The maximum number of channels, 0 indicates unlimited, and others are the maximum number of channels loaded
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/Dh

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devdh210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test dh device",

  "enabled": true,

  "sandbox": false,

  "subEvent": false,

  "apiPort": 80,

  "apiHttps": false,

  "maxChannel": 0

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Ivs Device

Description

Add Huawei Ivs device

Usage

Request parameters | POST
URL | /api/v1/Device/Add/Ivs
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded
rBufferTime | int | optional | Cache time

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/Ivs

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devivs210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test ivs device",

  "enabled": true,

  "maxChannel": 0,

  "sandbox": false,

  "rBufferTime": 200

}Returned message

{

  "code": 0,

  "msg": "Success"


Add Hik Device

Description

Add Hikvision SDK device

Usage

Request parameters | POST
URL | /api/v1/Device/Add/Hik
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
isApi | bool | optional | Whether to enable ISAPI
sandbox | bool | optional | Whether to enable Sandbox mode
subEvent | bool | optional | Whether to enable event subscription
apiPort | int | optional | API port
apiHttps | bool | optional | Whether to enable https
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/Hik

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devhik176name",

  "username": "admin",

  "password": "dmin12345",

  "devIP": "192.168.100.176",

  "devPort": "8000",

  "enableAudio": false,

  "description": "test hik device",

  "enabled": true,

  "isApi": false,

  "sandbox": false,

  "subEvent": false,

  "apiPort": 80,

  "apiHttps": false,

  "maxChannel":0

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add HikISC Platform

Description

Add HikISC platform

Usage

Request parameters | POST
URL | /api/v1/Device/Add/HikISC
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded
centralrecord | bool | optional | Central storage

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/HikISC

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devisc210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test isc device",

  "enabled": true,

  "maxChannel": 0,

  "sandbox": false,

  "centralrecord": false

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add HikInfov Platform

Description

Add Hikvision INFO visio platform

Usage

Request parameters | POST
URL | /api/v1/Device/Add/HikInfov
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded
centralrecord | bool | optional | Central storage

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/HikInfov

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devinfov210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test infov device",

  "enabled": true,

  "maxChannel": 0,

  "sandbox": false,

  "centralrecord": false

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Td Device

Description

Add Tiandy SDK device

Usage

Request parameters | POST
URL | /api/v1/Device/Add/Td
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/Td

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": true,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devtd210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test td device",

  "enabled": true,

  "maxChannel": 0,

  "sandbox": false

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Device

Description

Delete device

Usage

Request parameters | DELETE
URL | /api/v1/Device
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Device ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Device

{

  "ids":[10000,10002]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Get Device List

Description

Get device list

Usage

Request parameters | GET
URL | /api/v1/Device/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
pageSize | int | optional | Number of data per page: 10 by default
pageIndex | int | optional | Page default first page

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
pageSize | int | How many data per page
pageIndex | int | What page is it
result | array | Refer to the equipment data format

Examples

GET http://192.168.100.127:8085/api/v1/Device/List?pageSize=100

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 1,

      "pageIndex": 1,

      "pageSize": 100,

      "list": [

           {

              "devId": 1,

              "devPartitionId": 10000,

              "token": "9bfda4b7-040b-4831-a646-7eaddfc9dcfa",

              "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

              "name": "Device1",

              "type": "H5_DEV_FILE",

              "username": "invalid",

              "password": "invalid",

              "passwordEncrypted": false,

              "devIP": "invalid",

              "devPort": "invalid",

              "enableAudio": false,

              "enabled": true,

              "online": true,

              "description": "Device1 description",

              "strUrl": "D:\\main\\server\\usc\\usc-r1.3.0807.24-win64-release\\videos\\substream.mp4;",

              "strUrlSub": "",

              "bEnableUrlSub": false,

              "h5RTSPConnectType": "",

              "isApi": false,

              "sandbox": false,

              "subEvent": false,

              "apiPort": 0,

              "apiHttps": false,

              "maxChannel": 0,

              "rBufferTime": 0,

              "centralRecord": false,

              "VMS": false,

              "createdAt": "2024-08-19T15:45:52.430807+08:00",

              "updatedAt": "2024-08-22T11:22:33.550483+08:00"

           }

       ]


Get Video Files

Description

Get video files

Usage

Request parameters | GET
URL | /api/v1/Device/DevFileList
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Address of the video file

Examples

GET http://192.168.100.127:8085/api/v1/Device/DevFileList

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

      "D:\\main\\server\\usc\\usc-r1.3.0807.24-win64-release\\videos\\substream.mp4"

   ]


Update Device

Description

Update device

Usage

Request parameters | POST
URL | /api/v1/Device/Update
data | application/json;charset=UTF-8

Parameters

修改设备根据当前设备是那种类型 修改参数

Name | Type | Parameter mandatory | Description
devId | int | must | Device ID
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
strUrl | string | optional | Video file path
username | sring | optional | User name
password | sring | optional | Password
devIP | string | optional | Device IP
devPort | string | optional | Device port
isApi | bool | optional | Whether to start isapi
sandbox | bool | optional | Sandbox
subEvent | bool | optional | Time subscription
apiPort | int | optional | API port
apiHttps | bool | optional | Whether to start apiHttps
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded
centralrecord | bool | optional | Central storage

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Device/Update

{

  "devId": 2,

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10001,

  "name": "devhik176",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.176",

  "devPort": "8000",

  "enableAudio": false,

  "description": "test hik device",

  "enabled": true,

  "isApi": false,

  "sandbox": false,

  "subEvent": false,

  "apiPort": 80,

  "apiHttps": false,

  "maxChannel": 0

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add FILE

Description

To add a video file, you need to place the video file in the videos folder of the root directory of the software package in advance.

Usage

Request parameters | POST
URL | /api/v1/Device/Add/FILE
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
strUrl | string | must | Video file path
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/FILE

{

"nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

"setToken": false,

"token": "b1c3",

"devPartitionId": 10000,

"name": "devfile",

"strUrl":"D:\\main\\server\\usc\\usc-r1.2.1109.23-win64-release\\videos\\1.mp4;D:\\main\\server\\usc\\usc-r1.2.1109.23-win64-release\\videos\\2.mp4",

"enableAudio": false,

"description": "test dh device",

"enabled": true

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add ONVIF

Description

Add ONVIF

Usage

Request parameters | POST
URL | /api/v1/Device/Add/ONVIF
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
devIP | string | must | Device IP address
devPort | int | must | Device port

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/ONVIF

{

"nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

"setToken": false,

"token": "b1c3",

"devPartitionId": 10000,

"name": "onvif107",

"username": "admin",

"password": "vision@12345",

"devIP": "192.168.1.1",

"devPort": "80",

"enableAudio": false,

"description": "test dh device",

"enabled": true

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add RTSP

Description

Add RTSP

Usage

Request parameters | POST
URL | /api/v1/Device/Add/RTSP
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
strUrl | string | must | rtsp main stream address
bEnableUrlSub | bool | must | Whether to start the auxiliary code stream
strUrlSub | string | must | Secondary code stream address
h5RTSPConnectType | string | must | Line type

Examples

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

使用示例

POST http://192.168.100.127:8085/api/v1/Device/Add/RTPS

{

"nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

"setToken": false,

"token": "b1c3",

"devPartitionId": 10000,

"name": "rtsp107",

"username": "admin",

"password": "vision@12345",

"enableAudio": false,

"description": "test dh device",

"enabled": true,

"strUrl":"rtsp://192.168.100.107/stream",

"bEnableUrlSub":true,

"strUrlSub":"rtsp://192.168.100.107/stream",

"h5RTSPConnectType":"H5_RTSP_AUTO"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Dss Platform

Description

Add Dahua Dss platform

Usage

Request parameters | POST
URL | /api/v1/Device/Add/Dss
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/Dss

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devdhdss210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test dh device",

  "enabled": true,

  "maxChannel": 0,

  "sandbox": false

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Unv Device

Description

Add Unv Device

Usage

Request parameters | POST
URL | /api/v1/Device/Add/Unv
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
setToken | bool | must | Modify token
token | string | must | It takes effect when setToken is true
devPartitionId | int | must | Device partition id
name | string | must | Device name
username | string | must | User name
password | string | must | Password
devIP | string | must | Device IP address
devPort | string | must | Device port
enableAudio | bool | must | Whether to turn on audio
description | string | must | Device description
enabled | bool | must | Enable
sandbox | bool | optional | Whether to enable Sandbox mode
maxChannel | int | optional | The maximum number of channels, 0 indicates no limit, and others are the maximum number of channels loaded
VMS | bool | must | VMS
apiHttps | bool | must | Whether to enable apiHttps
apiPort | int | must | API port

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Device/Add/Unv

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "setToken": false,

  "token": "b1c3",

  "devPartitionId": 10000,

  "name": "devUnv210",

  "username": "admin",

  "password": "admin12345",

  "devIP": "192.168.100.210",

  "devPort": "37777",

  "enableAudio": false,

  "description": "test unv device",

  "enabled": true,

  "maxChannel": 0,

  "sandbox": false,

  "VMS": false,

  "subEvent": false,

  "apiPort": 80,

  "apiHttps": false

}

Returned message

{

  "code": 0,

  "msg": "Success"


Data Format Of Equipment Channel

Name | Type | Description
uuid | string | Channel uuid
token | string | Channel token
chanNo | int | Internal field
nodeId | string | Server ID
devChannel | string | Device token
parentToken | string | Internal field
rootParent | string | Internal field
name | string | Channel name
type | string | Type
enabled | bool | Enable status
metaEnabled | bool | Metadata analysis
idle | bool | Idle state
online | bool | Is it online
recording | bool | Video recording status
description | string | Channel description
dome | bool | Is it a dome camera
alias | string | Alias
longitude | string | Internal field
latitude | string | Internal field
chanType | string | Internal field
schedRecEnable | bool | Start the scheduled video recording
schedRecTemplate | string | Planning video template
manualRecEnable | bool | Start manual video recording


Get Device Channel

Description

Get device channel.

Usage

Request parameters | GET
URL | /api/v1/Device/Channels
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Device token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Refer to the data format of the device channel

Examples

GET http://192.168.100.127:8085/api/v1/Device/Channels?token=9bfda4b7-040b-4831-a646-7eaddfc9dcfa

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

       {

          "uuid": "482d0c89-9a9c-4a9b-9dac-f9885a36e74a",

          "token": "9bfda4b7-040b-4831-a646-7eaddfc9dcfa",

          "chanNo": 1,

          "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

          "devChannel": "9bfda4b7-040b-4831-a646-7eaddfc9dcfa",

          "parentToken": "9bfda4b7-040b-4831-a646-7eaddfc9dcfa",

          "rootParent": "9bfda4b7-040b-4831-a646-7eaddfc9dcfa",

          "name": "Device1",

          "type": "H5_FILE",

          "enabled": true,

          "metaEnabled": true,

          "idle": false,

          "online": true,

          "recording": false,

          "description": "",

          "dome": false,

          "alias": "",

          "longitude": "",

          "latitude": "",

          "chanType": "USC_CHAN_CAMERA",

          "setting": {

              "schedRecEnable": false,

              "schedRecTemplate": "6a2a8c4e-06d8-4f5a-a3ba-b0b1c6488d8c",

              "manualRecEnable": false

           },

          "createdAt": "2024-08-19T15:45:52.45717+08:00",

          "updatedAt": "2024-08-23T11:21:23.359611+08:00"

       }

   ]


Get The Online Status Of The Channel

Description

Get the online status of the channel.

Usage

Request parameters | POST
URL | /api/v1/Device/Channel/State
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
enable | bool | Presence
token | string | Channel token

Examples

POST http://192.168.100.127:8085/api/v1/Device/Channel/State

{

  "obj": [

       {"token":"b1c3"}

   ]

}

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "obj": [

           {

              "enable": false,

              "token": "b1c3"

           }

       ]


Obtain Channel Encoding Information

Description

Obtain channel encoding information.

Usage

Request parameters | GET
URL | /api/v1/GetVidStreamStatus
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
stream | string | must | main main code stream sub auxiliary code stream

Response

Name | Type | Description
strVideoType | string | Video encoding type
nVideoBitrate | int | Audio bitrate
nVideoFPS | int | Frame rate
nVideoWidth | int | Wide
nVideoHeight | int | High
strAudioType | string | Audio encoding type
nAudioSampleRate | int | Audio sampling rate
nAudioSampleBit | int | Audio sampling bit width
nAudioChannels | int | Number of audio channels
nAudioBitrate | int | Audio bitrate

Examples

GET http://192.168.100.127:8085/api/v1/GetVidStreamStatus?token=9bfda4b7-040b-4831-a646-7eaddfc9dcfa&stream=main

Returned message

{

  "strVideoType": "H264",

  "nVideoBitrate": 976072,

  "nVideoFPS": 24,

  "nVideoWidth": 720,

  "nVideoHeight": 576,

  "strAudioType": "NONE",

  "nAudioSampleRate": 0,

  "nAudioSampleBit": 0,

  "nAudioChannels": 0,

  "nAudioBitrate": 0


Server-Side Screenshot

Description

Server-side screenshot.

Usage

Request parameters | GET
URL | /api/v1/Snapshot
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
strFileName | string | Image file name
strUrl | string | Image address

Examples

GET http://192.168.100.127:8085/api/v1/Snapshot?token=9bfda4b7-040b-4831-a646-7eaddfc9dcfa&stream=main

Returned message

{

  "bStatus": true,

  "strCode": "Snapshot start successfully",

  "strFileName": "9bfda4b7-040b-4831-a646-7eaddfc9dcfa-5126f27e-7b27-4637-8e93-ae31b7d8850b.jpg",

  "strUrl": "/mediastore/snapshot/9bfda4b7-040b-4831-a646-7eaddfc9dcfa/2024-08-23TZ08/15-17-38/9bfda4b7-040b-4831-a646-7eaddfc9dcfa-5126f27e-7b27-4637-8e93-ae31b7d8850b.jpg"


Mark Whether The Channel Is A Dome Camera

Description

Mark whether the channel is a dome camera.

Usage

Request parameters | GET
URL | /api/v1/SetChannelDomeMode
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
dome | Bool | must | Is it a dome camera

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/SetChannelDomeMode?token=9bfda4b7-040b-4831-a646-7eaddfc9dcfa&dome=true

Returned message

{

  "code": 0,

  "msg": "Success"


Add An Alias For The Channel

Description

Add an alias for the channel.

Usage

Request parameters | GET
URL | /api/v1/SetChannelAliasName
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
alias | string | must | Alias

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/SetChannelAliasName?token=9bfda4b7-040b-4831-a646-7eaddfc9dcfa&alias=一楼电梯

Returned message

{

  "code": 0,

  "msg": "Success"


PTZ

Description

Modify channel PTZ.

Usage

Request parameters | GET
URL | /api/v1/PTZ
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
action | string | must | command up/upright/upleft/down/downright/downleft/left/right/zoomin/zoomout/focusin/focusout/irisin/irisout/stop/preset/lighton/lightoff/wiperon/wiperoff
speed | string | object | Speed (0-1), no speed required for stopping
preset | string | object | Enabled when action is preset

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Ptz?token=0e8e6d96-9304-4179-8311-20dbba3b6518--34&action=stop&speed=0.5

Returned message

{

  "bStatus": true,

  "strCode": "PTZ successfully"


Modify Preset Position

Description

Modify the preset position of the channel.

Usage

Request parameters | GET
URL | /api/v1/SetPreset
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
presetname | string | must | Name of preset position
presettoken | String | object | Preset token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/SetPreset?token=58d681fa-0ca6-452f-aa7a-dc98acd01228--34&presetname=预置位1&presettoken=2

Returned message

{

  "bStatus": true,

  "strCode": "PTZ successfully"


Get Preset Position

Description

Obtain the preset position of the channel.

Usage

Request parameters | GET
URL | /api/v1/GetPreset
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/GetPreset?token=58d681fa-0ca6-452f-aa7a-dc98acd01228--34

Returned message

{

  "preset": [

       {

          "strName": "1",

          "strToken": "1"


Delete Preset Position

Description

Delete channel preset position.

Usage

Request parameters | GET
URL | /api/v1/DelPreset
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
presettoken | string | object | Preset token

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/DelPreset?token=58d681fa-0ca6-452f-aa7a-dc98acd01228--34&presettoken=2

Returned message

{

  "bStatus": true,

  "strCode": "PTZ successfully"


Obtain The Channel Video Segment

Description

Obtain the channel video segment.

Usage

Request parameters | GET
URL | /api/v1/SearchDeviceRecordByTime
data | none

Parameters

Name | Type | Parameter mandatory | Description
token | string | must | Channel token
start | string | must | Video start time
end | string | must | End time of video recording
maxlen | int | object | Maximum duration of each segment in seconds

Response

Name | Type | Description
bFinished | Bool | Whether the search is complete in the input time period. If false, the end time of the last video returned can be used as the start parameter to re-search, which can fully search all video segments
strStartTime | string | Video start time
strEndTime | string | End time of video recording
nType | string | H5_REC_MANUAL/H5_REC_SCHEDULE/H5_REC_ALARM Manual Recording/Scheduled Recording/Alarm Recording

Examples

GET http://192.168.100.127:8085/api/v1/SearchDeviceRecordByTime?token=9bfda4b7-040b-4831-a646-7eaddfc9dcfa&start=2024-8-17T00:00:00%2b08&end=2024-8-20T23:59:59%2b08&maxlen=900

Returned message

{

  "bFinished": true,

  "nMaxLen": 86400,

  "record": [

 {

  "strStartTime": "2024-08-23T10:31:19+08:00",

  "strEndTime": "2024-08-23T10:35:53+08:00",

  "nDurationInSec": 274,

  "type": [

  "H5_STOR_REC_ALERT",

  "H5_STOR_REC_A_MOTION",

  "H5_STOR_REC_A_OBJECT"

  ],

  "nSizeInMBytes": 35

 }

]


Get Operating Mode

Description

Get operating mode.

Usage

Request parameters | GET
URL | /api/v1/Cluster/GetServerMode
data | none

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
nServerMode | string | Operating mode

Examples

GET http://192.168.100.127:8085/api/v1/Cluster/GetServerMode?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "nServerMode": "USC_SERVER_MAIN"


Get Hot Standby Mode

Description

Get hot standby mode.

Usage

Request parameters | PUT
URL | /api/v1/Cluster/GetSubStandbyMode
data | none

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
bSubStandbyMode | string | Start hot standby mode

Examples

PUT http://192.168.100.127:8085/api/v1/Cluster/GetSubStandbyMode?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "bSubStandbyMode": "false"


Get Server Information

Description

Get server information.

Usage

Request parameters | GET
URL | /api/v1/Cluster/GetServerConf
data | none

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
strNodeName | string | Server name
strServerIP | string | Server IP address

Examples

GET http://192.168.100.127:8085/api/v1/Cluster/GetServerConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "strNodeName": "Server1",

      "strServerIP": "0.0.0.0"


Get Server Configuration

Description

Get server configuration.

Usage

Request parameters | GET
URL | /api/v1/Cluster/GetMainSecondaryConf
data | none

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
strMainIP | string | Primary server IP address
bHasSecondary1 | bool | Whether to enable the standby server 1
strSecondary1IP | string | Backup server 1 ip
bHasSecondary2 | bool | Whether to enable the standby server 2
strSecondary2IP | string | Backup server 1 ip

Examples

GET http://192.168.100.127:8085/api/v1/Cluster/GetMainSecondaryConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "strMainIP": "192.168.100.100",

      "bHasSecondary1": false,

      "strSecondary1IP": "192.168.100.101",

      "bHasSecondary2": false,

      "strSecondary2IP": "192.168.100.102"


Update The Operation Mode

Description

Update the operation mode.

Usage

Request parameters | PUT
URL | /api/v1/Cluster/UpdateServerMode
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
nServerMode | string | must | Operating mode

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Cluster/UpdateServerMode

{

  "nodeId":"e09422f7-813e-4483-a551-3ee81a944ae9",

  "nServerMode": "USC_SERVER_MAIN"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update The Hot Standby Mode

Description

Update the hot standby mode.

Usage

Request parameters | PUT
URL | /api/v1/Cluster/UpdateSubStandbyMode
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
bSubStandbyMode | bool | must | Whether to enable hot standby mode

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Cluster/UpdateSubStandbyMode?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

{

  "nodeId":"e09422f7-813e-4483-a551-3ee81a944ae9",

  "bSubStandbyMode": true

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update Server Information

Description

Update server information.

Usage

Request parameters | PUT
URL | /api/v1/Cluster/UpdateServerConf
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
strServerIP | string | must | Server IP address
strNodeName | string | must | Server name

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Cluster/UpdateServerConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

{

  "nodeId":"e09422f7-813e-4483-a551-3ee81a944ae9",

  "strNodeName": "server127",

   "strServerIP": "10.192.1.127"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update Server Configuration

Description

Update server configuration.

Usage

Request parameters | PUT
URL | /api/v1/Cluster/UpdateMainSecondaryConf
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID
strMainIP | string | must | Primary server IP address
bHasSecondary1 | bool | must | Whether to enable the standby server 1
strSecondary1IP | string | must | Backup server 1 ip
bHasSecondary2 | bool | must | Whether to enable the standby server 2
strSecondary2IP | string | must | Backup server 1 ip

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Cluster/UpdateMainSecondaryConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "strMainIP": "192.168.100.100",

  "bHasSecondary1": false,

  "strSecondary1IP": "192.168.100.110",

  "bHasSecondary2": false,

  "strSecondary2IP": "192.168.100.102"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Get The Server List

Description

Get the server list.

Usage

Request parameters | GET
URL | /api/v1/WorkServer/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
pageSize | int | How many data per page
pageIndex | int | What page is it
nodeId | string | Server ID
nodeType | string | server type
nodeName | string | Server name

Examples

GET http://192.168.100.127:8085/api/v1/WorkServer/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 1,

      "pageIndex": 1,

      "pageSize": 10,

      "list": [

           {

              "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

              "nodeType": "main",

              "nodeName": "Server1"

           }

       ]


Obtain The Total Information Of Server Devices

Description

Obtain the total information of server devices.

Usage

Request parameters | GET
URL | /api/v1/GetDeviceSummary
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
nCameraTotal | int | Total number of devices
nCameraOnline | int | Number of online users
nHikDevTotal | int | Total number of Hikvision SDK
nHikDevOnline | int | Number of Hikvision SDK online
nDhDevTotal | int | Total number of SDK of Dahua
nDhDevOnline | int | Number of Dahua SDK online
nHikIscDevTotal | int | Total number of Hikvision ISC
nHikIscDevOnline | int | Number of Hikvision ISC online
nTdDevTotal | int | Total number of Tiandy SDK
nTdDevOnline | int | Number of Tiandy online
nGbDevTotal | int | Total number of GB
nGbDevOnline | int | Number of GB online
nUnvDevTotal | int | Total number of UNV
nUnvDevOnline | int | Number of UNV online
nDssDevTotal | int | Total number of Dahua DSS
nDssDevOnline | int | Number of Dahua DSS online
nIvsDevTotal | int | Total IVS
nIvsDevOnline | int | Number of IVS online
nHikINFOVTotal | int | Total number of Hikvision INFOV
nHikINFOVOnline | int | Number of Hikvision INFOV online
nRTSPRTMPTotal | int | Total number of RTSP/RTMP
nRTSPRTMPOnline | int | Number of RTSP/RTMP online
nONVIFTotal | int | Total ONVIF
nONVIFOnline | int | ONVIF online number
nRTMPPushTotal | int | Total number of RTMP push
nRTMPPushOnline | int | Number of RTMPPush online

Examples

GET http://192.168.100.127:8085/api/v1/WorkServer/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "nCameraTotal": 0,

      "nCameraOnline": 0,

      "nHikDevTotal": 0,

      "nHikDevOnline": 0,

      "nDhDevTotal": 0,

      "nDhDevOnline": 0,

      "nHikIscDevTotal": 0,

      "nHikIscDevOnline": 0,

      "nTdDevTotal": 0,

      "nTdDevOnline": 0,

      "nGbDevTotal": 0,

      "nGbDevOnline": 0,

      "nUnvDevTotal": 0,

      "nUnvDevOnline": 0,

      "nDssDevTotal": 0,

      "nDssDevOnline": 0,

      "nIvsDevTotal": 0,

      "nIvsDevOnline": 0,

      "nHikINFOVTotal": 0,

      "nHikINFOVOnline": 0,

      "nRTSPRTMPTotal": 0,

      "nRTSPRTMPOnline": 0,

      "nONVIFTotal": 0,

      "nONVIFOnline": 0,

      "nRTMPPushTotal": 0,

      "nRTMPPushOnline": 0


Obtain The Server Device Information List

Description

Obtain the server device information list.

Usage

Request parameters | GET
URL | /api/v1/GetServerDevice
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
nodeid | string | Server ID
nCameraTotal | int | Total number of devices
nCameraOnline | int | Number of online users
nHikDevTotal | int | Total number of Hikvision SDK
nHikDevOnline | int | Number of Hikvision SDK online
nDhDevTotal | int | Total number of SDK of Dahua
nDhDevOnline | int | Number of Dahua SDK online
nHikIscDevTotal | int | Total number of Hikvision ISC
nHikIscDevOnline | int | Number of Hikvision ISC online
nTdDevTotal | int | Total number of Tiandy SDK
nTdDevOnline | int | Number of Tiandy online
nGbDevTotal | int | Total number of GB
nGbDevOnline | int | Number of GB online
nUnvDevTotal | int | Total number of UNV
nUnvDevOnline | int | Number of UNV online
nDssDevTotal | int | Total number of Dahua DSS
nDssDevOnline | int | Number of Dahua DSS online
nIvsDevTotal | int | Total IVS
nIvsDevOnline | int | Number of IVS online
nHikINFOVTotal | int | Total number of Hikvision INFOV
nHikINFOVOnline | int | Number of Hikvision INFOV online
nRTSPRTMPTotal | int | Total number of RTSP/RTMP
nRTSPRTMPOnline | int | Number of RTSP/RTMP online
nONVIFTotal | int | Total ONVIF
nONVIFOnline | int | ONVIF online number
nRTMPPushTotal | int | Total number of RTMP push
nRTMPPushOnline | int | Number of RTMPPush online

Examples

GET http://192.168.100.127:8085/api/v1/WorkServer/List

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

       {

          "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

          "nCameraTotal": 0,

          "nCameraOnline": 0,

          "nHikDevTotal": 0,

          "nHikDevOnline": 0,

          "nDhDevTotal": 0,

          "nDhDevOnline": 0,

          "nHikIscDevTotal": 0,

          "nHikIscDevOnline": 0,

          "nTdDevTotal": 0,

          "nTdDevOnline": 0,

          "nGbDevTotal": 0,

          "nGbDevOnline": 0,

          "nUnvDevTotal": 0,

          "nUnvDevOnline": 0,

          "nDssDevTotal": 0,

          "nDssDevOnline": 0,

          "nIvsDevTotal": 0,

          "nIvsDevOnline": 0,

          "nHikINFOVTotal": 0,

          "nHikINFOVOnline": 0,

          "nRTSPRTMPTotal": 0,

          "nRTSPRTMPOnline": 0,

          "nONVIFTotal": 0,

          "nONVIFOnline": 0,

          "nRTMPPushTotal": 0,

          "nRTMPPushOnline": 0

       }

   ]


Get Server Running Information

Description

Get server running information.

Usage

Request parameters | GET
URL | /api/v1/GetRunInfo
data | none

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID

Response

Name | Type | Description
strRunTime | string | Running time
strCPU | string | CPU usage
strMemory | string | Server ID
strNetworkIn | string | Network incoming traffic
strNetworkOut | string | Network traffic
strTotalSpace | string | Total disk space
strFreeSpace | string | Remaining space
strRecordTotalSpace | string | Internal field
strRecordFreeSpace | string | Internal field
nRunTimeSec | string | Internal field
nCPUUsage | string | Internal field
nMemoryUsage | string | Internal field
nTotalMemoryByte | string | Internal field

Examples

GET http://192.168.100.127:8085/api/v1/WorkServer/List

Returned message

{

  "strRunTime": "3H 31MIN",

  "strCPU": "8%",

  "strMemory": "73%",

  "strNetworkIn": "2Kbps",

  "strNetworkOut": "0Kbps",

  "strTotalSpace": "375Gbytes",

  "strFreeSpace": "111Gbytes",

  "strRecordTotalSpace": "375Gbytes",

  "strRecordFreeSpace": "111Gbytes",

  "nRunTimeSec": "12715",

  "nCPUUsage": "8",

  "nMemoryUsage": "73",

  "nTotalMemoryByte": "16867512320",

  "nNetworkInK": "2",

  "nNetworkOutK": "0",

  "nTotalSpaceByte": "403291762688",

  "nFreeSpaceByte": "119198154752",

  "nRecordTotalSpaceByte": "403291762688",

  "nRecordFreeSpaceByte": "119198154752"


Get Codec Information

Description

Get codec information.

Usage

Request parameters | GET
URL | /api/v1/GetCodecInfo
data | none

Parameters

Name | Type | Parameter mandatory | Description
nodeId | string | must | Server ID

Response

Name | Type | Description
strCPUModel | string | CPU model
nCPU | string | Number of CPU paths
nCPUCore | string | Number of CPU cores
strHWEncoders | string | GPU encoder
strHWDecoders | string | GPU decoder
strSWEncoders | string | Software encoder
strSWDecoders | string | Software encoder

Examples

GET http://192.168.100.127:8085/api/v1/WorkServer/List

Returned message

{

  "strRunTime": "3H 31MIN",

  "strCPU": "8%",

  "strMemory": "73%",

  "strNetworkIn": "2Kbps",

  "strNetworkOut": "0Kbps",

  "strTotalSpace": "375Gbytes",

  "strFreeSpace": "111Gbytes",

  "strRecordTotalSpace": "375Gbytes",

  "strRecordFreeSpace": "111Gbytes",

  "nRunTimeSec": "12715",

  "nCPUUsage": "8",

  "nMemoryUsage": "73",

  "nTotalMemoryByte": "16867512320",

  "nNetworkInK": "2",

  "nNetworkOutK": "0",

  "nTotalSpaceByte": "403291762688",

  "nFreeSpaceByte": "119198154752",

  "nRecordTotalSpaceByte": "403291762688",

  "nRecordFreeSpaceByte": "119198154752"


地图(Map)

Map Data Format

Name | Type | Description
type | string | Map types USC_MAP_STATIC (static map), USC_MAP_TILE (tile map), USC_MAP_GAO_DE (Gaode map), USC_MAP_GOOGLE (Google map), USC_MAP_TIAN (Tian map)
devPartitionId | int | Device partition id
center | array | Map center point
zoom | int | Map zoom
minZoom | int | Minimal zoom
maxZoom | int | Maximum zoom
mapName | int | Map Name
description | int | Map Description
mapUrl | int | Map address
mapUrl2 | int | Map address 2
imgBase64 | string | Base64 code of static map image
mapView | array | Reference Map View
mapElementLink | array | Link to reference map
mapElementChannel | array | Reference map video channel
mapElementDoor | array | Reference Map Door


Get Map List

Description

Get map list.

Usage

Request parameters | GET
URL | /api/v1/Map/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Reference map data format

Examples

GET http://192.168.100.127:8085/api/v1/Map/List

Returned message

{

   "code": 0,

  "msg": "Success",

  "result": [

       {

          "mapId": 2,

          "type": "USC_MAP_GAO_DE",

          "uuid": "0509cc43-8b19-463b-8ee5-d8b54792c9f7",

          "devPartitionId": 10000,

          "extent": null,

          "center": [

              121,

              31

           ],

          "zoom": 14,

          "minZoom": 7,

          "maxZoom": 18,

          "mapName": "autonavi",

          "mapUrl": "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",

          "mapUrl2": "",

          "projection": "EPSG:3857",

          "description": "Map1 Description",

          "mapView": null,

          "mapElementLink": null,

          "mapElementChannel": null,

          "mapElementDoor": null,

          "createdAt": "2024-09-09T15:19:29.519365+08:00",

          "updatedAt": "2024-09-09T15:20:59.291301+08:00"

       }

   ]


Get Map Information

Description

Get map information.

Usage

Request parameters | GET
URL | /api/v1/Map//$1
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
result | array | Reference map data format

Examples

GET http://192.168.100.127:8085/api/v1/Map/2

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

          "mapId": 2,

          "type": "USC_MAP_GAO_DE",

          "uuid": "0509cc43-8b19-463b-8ee5-d8b54792c9f7",

          "devPartitionId": 10000,

          "extent": null,

          "center": [

              121,

              31

          ],

          "zoom": 14,

          "minZoom": 7,

          "maxZoom": 18,

          "mapName": "autonavi",

          "mapUrl": "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",

          "mapUrl2": "",

          "projection": "EPSG:3857",

          "description": "Map1 Description",

          "mapView": null,

          "mapElementLink": null,

          "mapElementChannel": null,

          "mapElementDoor": null,

          "createdAt": "2024-09-09T15:19:29.519365+08:00",

          "updatedAt": "2024-09-09T15:20:59.291301+08:00"


Add Static Map

Description

Add static map.

Usage

Request parameters | POST
URL | /api/v1/Map/Static
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
type | string | must | Map types USC_MAP_STATIC (static map), USC_MAP_TILE (tile map), USC_MAP_GAO_DE (Gaode map), USC_MAP_GOOGLE (Google map), USC_MAP_TIAN (Tian map)
devPartitionId | int | must | Device partition id
center | array | must | Map center point
zoom | int | must | Map zoom
minZoom | int | must | Minimal zoom
maxZoom | int | must | Maximum zoom
mapName | int | must | Map Name
description | int | object | Map Description
imgBase64 | string | must | Base64 code of static map image

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Map/Static

{

  "type": "USC_MAP_STATIC",

  "devPartitionId": 10000,

  "zoom": 7,

  "minZoom": 7,

  "maxZoom": 18,

  "mapName": "map2",

  "description": "",

  "imgBase64": "data:image/......"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add A Slice Map

Description

Add a Slice Map.

Usage

Request parameters | POST
URL | /api/v1/Map/Tile
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
type | string | must | Map types USC_MAP_STATIC (static map), USC_MAP_TILE (tile map), USC_MAP_GAO_DE (Gaode map), USC_MAP_GOOGLE (Google map), USC_MAP_TIAN (Tian map)
devPartitionId | int | must | Device partition id
center | array | must | Map center point
zoom | int | must | Map zoom
minZoom | int | must | Minimal zoom
maxZoom | int | must | Maximum zoom
mapName | int | must | Map Name
description | int | object | Map Description
mapUrl | string | must | Map address

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Map/Tile

{

  "type": "USC_MAP_TILE",

  "devPartitionId": 10000,

  "center": [121, 31],

  "zoom": 10,

  "minZoom":7,

  "maxZoom":18,

  "mapName": "Shanghai",

  "description": "",

  "mapUrl":"http://localhost:8080/mediastore/map/pujiang/{z}/{x}/{y}.png"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add GIS Map

Description

Add GIS map.

Usage

Request parameters | POST
URL | /api/v1/Map/GIS
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
type | string | must | Map types USC_MAP_STATIC (static map), USC_MAP_TILE (tile map), USC_MAP_GAO_DE (Gaode map), USC_MAP_GOOGLE (Google map), USC_MAP_TIAN (Tian map)
devPartitionId | int | must | Device partition id
center | array | must | Map center point
zoom | int | must | Map zoom
minZoom | int | must | Minimal zoom
maxZoom | int | must | Maximum zoom
mapName | int | must | Map Name
description | int | object | Map Description
mapUrl | string | must | Map address
mapUrl2 | string | object | Map address 2

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Map/GIS

{

  "type": "USC_MAP_GAO_DE",

  "devPartitionId": 10000,

  "center": [121.31542, 31],

  "zoom": 10,

  "minZoom":7,

  "maxZoom":18,

  "mapName": "autonavi",

  "description": "",

  "mapUrl":"http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",

  "mapUrl2":""

}Returned message

{

  "code": 0,

  "msg": "Success"


Update Map

Description

Update map.

Usage

Request parameters | PUT
URL | /api/v1/Map
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
mapId | int | must | Map ID
devPartitionId | int | must | Server ID
mapName | int | must | Map Name
zoom | int | must | Map zoom
minZoom | int | must | Minimal zoom
maxZoom | int | must | Maximum zoom
mapUrl | string | must | Map address
mapUrl2 | string | object | Map address 2

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Map

{

  "mapId":1,

  "devPartitionId":10001,

  "mapName":"map1",

  "zoom":8,

  "minZoom":8,

  "maxZoom":18，

  "mapUrl":"http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update Static Map

Description

Update static map.

Usage

Request parameters | PUT
URL | /api/v1/Map/Static
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
mapId | int | must | Map ID
devPartitionId | int | must | Server ID
mapName | int | must | Map Name
zoom | int | must | Map zoom
minZoom | int | must | Minimal zoom
maxZoom | int | must | Maximum zoom
imgBase64 | string | must | Base64 code of static map image

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Map/Static

{

  "mapId":1,

  "devPartitionId":10001,

  "mapName":"map1",

  "zoom":8,

  "minZoom":8,

  "maxZoom":18，

  "imgBase64": "data:image/png;...."

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Map

Description

Delete map.

Usage

Request parameters | DELETE
URL | /api/v1/Map
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Map ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Map

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Map Connection

Description

Add map connections to the map.

Usage

Request parameters | POST
URL | /api/v1/Map/ElementLink
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
mapId | int | must | Map ID
mapLinkId | int | must | Connected map id
resName | int | must | Name
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Map/ElementLink

{

  "id":1,

  "mapLinkId": 2,

  "resName": "Connect 1",

  "longitude": 20000,

  "latitude": 20000

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update Map Connection

Description

Update map connections on the map.

Usage

Request parameters | PUT
URL | /api/v1/Map/ElementLink
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number
mapLinkId | int | must | Connected map id
resName | int | must | Name
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Map/ElementLink

{

  "id":1,

  "mapLinkId": 2,

  "resName": "Connect 1",

  "longitude": 20000,

  "latitude": 20000

}

Returned message

{

  "code": 0,

  "msg": "Success"


Remove Map Connection

Description

Remove the connection map on the map.

Usage

Request parameters | DELETE
URL | /api/v1/Map/ElementLink
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Number ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Map/ElementLink

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Channel

Description

Add video channel on the map.

Usage

Request parameters | POST
URL | /api/v1/Map/Cam/Channel
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
mapId | int | must | Map ID
channelUUID | string | must | Video channel UUID
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map
radius | int | must | Radius
angle | int | must | View
rotationAngle | int | must | Angle
fillCollor | string | object | Fill color

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Map/Cam/Channel

{

  "mapId": 4,

  "channelUUID": "030a5222-7463-4d96-9053-920177a02b04",

  "longitude": 20000,

  "latitude": 15000,

  "radius":15,

  "angle":90,

  "rotationAngle":30,

  "fillCollor":"USC_CAM_COLOR_DEFAULT"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update Channel

Description

Update video channel on the map.

Usage

Request parameters | PUT
URL | /api/v1/Map/Cam/Channel
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number
channelUUID | string | must | Video channel UUID
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map
radius | int | must | Radius
angle | int | must | View
rotationAngle | int | must | Angle
fillCollor | string | object | Fill color

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Map/Cam/Channel

{

  "mapId": 4,

  "channelUUID": "030a5222-7463-4d96-9053-920177a02b04",

  "longitude": 20000,

  "latitude": 15000,

  "radius":15,

  "angle":90,

  "rotationAngle":30,

  "fillCollor":"USC_CAM_COLOR_DEFAULT"

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Map Channel

Description

Delete video channel on the map.

Usage

Request parameters | DELETE
URL | /api/v1/Map/Cam/Channel
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Number ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Map/Cam/Channel

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update View

Description

Update the map view.

Usage

Request parameters | PUT
URL | /api/v1/Map/View
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Map/View

{

  "id":1,

  "longitude": 45454444444,

  "latitude": 48749454654

}

Returned message

{

  "code": 0,

  "msg": "Success"


Map Add View

Description

Add a view to the map.

Usage

Request parameters | POST
URL | /api/v1/Map/View
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number
viewUUID | string | must | View UUID
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

使用示例

POST http://192.168.100.127:8085/api/v1/Map/View

{

  "mapId":5,

  "viewUUID": "a3fd9448-4a23-4b5b-bf6c-94997a3aa4e4",

  "longitude": 20000

  "latitude": 15000

}

Returned message

{

  "code": 0,

  "msg": "Success"


Map Delete View

Description

Delete the view on the map.

Usage

Request parameters | DELETE
URL | /api/v1/Map/View
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

使用示例

DELETE http://192.168.100.127:8085/api/v1/Map/View

{

  "ids":[4],

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete View

Description

Delete View.

Usage

Request parameters | DELETE
URL | /api/v1/View
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | View ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/View

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Add Door

Description

Add doors to the map.

Usage

Request parameters | POST
URL | /api/v1/Map/Door
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number
doorUUID | string | must | Door UUID
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Map/View

{

  "mapId": 5,

  "doorUUID": "a3fd9448-4a23-4b5b-bf6c-94997a3aa4e4",

  "longitude": 20000,

  "latitude": 15000

}

Returned message

{

  "code": 0,

  "msg": "Success"


Update Door

Description

Update the map.

Usage

Request parameters | PUT
URL | /api/v1/Map/Door
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
id | int | must | Number
longitude | int | must | Coordinates or longitude on the map
latitude | int | must | Coordinates or dimensions on the map

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/Map/Door

{

  "id":1,

  "longitude": 45454444444,

  "latitude": 48749454654

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Door

Description

Remove the door on the map.

Usage

Request parameters | DELETE
URL | /api/v1/Map/Door
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Number ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Map/Door

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Get Custom Layout

Description

Get custom layout.

Usage

Request parameters | GET
URL | /api/v1/Layout
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

GET http://192.168.100.127:8085/api/v1/Layout

Returned message

[

       {

          "layoutId": 1,

          "UUID": "1c064e6e-4c5d-49e2-8b73-50c0385bd8ac",

          "layoutIcon": "",

          "layoutName": "1",

          "layoutType": "1|1",

          "setting": {

              "layoutView": [

                   {

                      "position": "1-1",

                      "rowStart": 1,

                      "rowEnd": 2,

                      "colStart": 1,

                      "colEnd": 2,

                      "merged": true

                   }

               ]

           },

          "createdAt": "2024-09-09T10:55:42.11767+08:00",

          "updatedAt": "2024-09-09T10:55:42.11767+08:00"

       },

      ...


Add Custom Layout

Description

Add custom layout.

Usage

Request parameters | POST
URL | /api/v1/Layout
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
layoutName | int | must | Custom Layout Name
layoutIcon | string | must | Customize the layout icon
layoutType | int | must | Customize layout classification
setting | objece | must | Internal fields

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/Layout

{

  "layoutName": "layout1",

  "layoutIcon": "layout1",

  "layoutType": "2|2",

  "setting": {

      "layoutView": [

           {

              "position": "1-1",

              "rowStart": 1,

              "rowEnd": 3,

              "colStart": 1,

              "colEnd": 2,

              "merged": true

           },

           {

              "position": "1-1",

              "rowStart": 1,

              "rowEnd": 3,

              "colStart": 2,

              "colEnd": 3,

              "merged": true

           }

       ]

   }

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Custom Layout

Description

Delete custom layout.

Usage

Request parameters | DELETE
URL | /api/v1/Layout
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Custom layout id

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Layout

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Get View

Description

Get View.

Usage

Request parameters | GET
URL | /api/v1/View/&1
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
viewId | int | View ID
uuid | string | View UUID
parentId | int | Parent view id
devPartitionId | int | Device partition id
viewType | stirng | View type
userName | string | User name
viewName | string | View name
layoutId | int | Custom layout id
layout | object | Customize layout content
viewEntity | array | Properties of each grid

Examples

GET http://192.168.100.127:8085/api/v1/View

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": {

      "viewId": 1,

      "uuid": "29cd10e3-6aef-419e-87be-2704a3c091bd",

      "parentId": 0,

      "devPartitionId": 10000,

      "viewType": "USC_VIEW_PUBLIC",

      "userName": "admin",

      "viewName": "view1",

      "layoutId": 7,

      "layout": {

          "layoutId": 7,

          "UUID": "fb84ba97-1752-47f1-9163-4845236626ef",

          "layoutIcon": "",

          "layoutName": "4",

          "layoutType": "2|2",

          "setting": {

              "layoutView": [

                   {

                      "position": "1-1",

                      "rowStart": 1,

                      "rowEnd": 2,

                      "colStart": 1,

                      "colEnd": 2,

                      "merged": false

                   },

                   {

                      "position": "1-2",

                      "rowStart": 1,

                      "rowEnd": 2,

                      "colStart": 2,

                      "colEnd": 3,

                      "merged": false

                   },

                .....

       },

      "viewEntity": [

           {

              "viewEntityId": 1,

              "viewId": 1,

              "uuid": "00000000-0000-0000-0000-000000000000",

              "entityType": "USC_VIEW_MAP",

              "layoutPosition": "h1-1",

              "resourceUUID": "db8fca28-3cd5-4e60-9e4a-8d69ddfb9bd0",

              "profile": "",

             "Map": {

                  "mapId": 3,

                  "type": "USC_MAP_TILE",

                  "uuid": "db8fca28-3cd5-4e60-9e4a-8d69ddfb9bd0",

                  "devPartitionId": 10000,

                  "extent": null,

                  "center": [

                      121,

                      31

                   ],

                  "zoom": 14,

                  "minZoom": 7,

                  "maxZoom": 18,

                  "mapName": "Map World",

                  "mapUrl": "http://t1.tianditu.gov.cn/vec_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=52c8ce2d4d1701548ee57db026b301ea",

                  "mapUrl2": "",

                  "projection": "EPSG:4326",

                  "description": "Map1 Description",

                  "mapView": null,

                  "mapElementLink": null,

                  "mapElementChannel": null,

                  "mapElementDoor": null,

                  "createdAt": "2024-09-09T15:20:27.340996+08:00",

                  "updatedAt": "2024-09-09T16:30:15.057014+08:00"

               }

           },

           ...


Add View

Description

Add View.

Usage

Request parameters | POST
URL | /api/v1/View
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
devPartitionId | int | must | Device partition id
viewType | string | must | View types USC_VIEW_PRIVATE (private), USC_VIEW_PUBLIC (public)
viewName | string | must | View Name
layoutId | objece | must | Custom layout id
viewEntity | array | must | Refer to the description of the viewEntity parameter

ViewEntity Usage

Name | Type | Parameter mandatory | Description
entityType | string | must | USC_VIEW_CAMERA(Channel)、USC_VIEW_MAP(Map)
layoutPosition | string | must | In the custom layout grid
resourceUUID | int | must | The UUID of the map or channel
profile | String | object | Main and auxiliary streams

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/View

{

  "devPartitionId":10000,

  "viewType":"USC_VIEW_PRIVATE",

  "viewName":"view1",

  "layoutId":10,

  "viewEntity":[{

      "entityType":"USC_VIEW_CAMERA",

    "layoutPosition":"2-2",

      "resourceUUID":"5dd00d23-b479-4f86-a800-eba9a2c24bd9",

      "profile":"main"

  }]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Modify View

Description

Modify View.

Usage

Request parameters | PUT
URL | /api/v1/View
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
viewId | int | must | View ID
devPartitionId | int | must | Device partition id
viewType | string | must | View types USC_VIEW_PRIVATE (private), USC_VIEW_PUBLIC (public)
viewName | string | must | View Name
layoutId | objece | must | Custom layout id
viewEntity | array | must | Refer to the description of the viewEntity parameter

ViewEntity Usage

Name | Type | Parameter mandatory | Description
entityType | string | must | USC_VIEW_CAMERA(Channel)、USC_VIEW_MAP(Map)
layoutPosition | string | must | In the custom layout grid
resourceUUID | int | must | The UUID of the map or channel
profile | String | object | Main and auxiliary streams

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/View

{

   "viewId": 3,

  "devPartitionId":10000,

  "viewType":"USC_VIEW_PRIVATE",

  "viewName":"view1",

  "layoutId":10,

  "viewEntity":[{

    "entityType":"USC_VIEW_CAMERA",

      "layoutPosition":"2-2",

      "resourceUUID":"5dd00d23-b479-4f86-a800-eba9a2c24bd9",

      "profile":"main"

  }]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Obtain Patrol List

Description

Obtain the patrol list.

Usage

Request parameters | GET
URL | /api/v1/Patrol/List
data | none

Parameters

Name | Type | Parameter mandatory | Description
none | none | none | none

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure
patrolId | int | Patrol ID
uuid | string | Patrol uuid
patrolName | string | Patrol name
devPartitionId | int | Device partition id
viewId | int | View ID
dwellTime | int | Stay time

Examples

GET http://192.168.100.127:8085/api/v1/View

Returned message

{

  "code": 0,

  "msg": "Success",

  "result": [

       {

          "patrolId": 1,

          "uuid": "659613b6-dd1e-450b-8e84-deda2ccc1d47",

          "patrolName": "patrol1",

          "elementView": [

               {

                  "patrolId": 1,

                  "viewId": 1,

                  "patrolTime": 20

               }

           ]

       }

   ]


Add Patrol

Description

Add Patrol

Usage

Request parameters | POST
URL | /api/v1/Patrol
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
patrolName | string | must | Patrol name
dwellTime | int | must | Stay time
viewId | int | must | View ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

POST http://192.168.100.127:8085/api/v1/View

{

  "patrolName": "patrol1",

  "elementView": [

       {

          "patrolTime": 20,

          "viewId":1

       }

   ]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Modify Patrol

Description

Modify Patrol.

Usage

Request parameters | PUT
URL | /api/v1/Patrol
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
uuid | int | must | Patrol uuid
patrolName | string | must | Patrol name
dwellTime | string | must | Stay time
viewId | string | must | View ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

PUT http://192.168.100.127:8085/api/v1/View

{

  "uuid":"d18d5d11-c316-4393-be08-16dc54b2f34c",

  "patrolName": "patrol10",

  "elementView": [

       {

          "patrolTime": 20,

          "viewId":1

       }

   ]

}

Returned message

{

  "code": 0,

  "msg": "Success"


Delete Patrol

Description

Delete Patrol.

Usage

Request parameters | DELETE
URL | /api/v1/Patrol
data | application/json;charset=UTF-8

Parameters

Name | Type | Parameter mandatory | Description
ids | array | must | Patrol ID

Response

Name | Type | Description
code | int | 0 indicates success
msg | string | Specific description success or failure

Examples

DELETE http://192.168.100.127:8085/api/v1/Patrol

{

  "ids":[4]

}

Returned message

{

  "code": 0,

  "msg": "Success"


录像管理(Record)_2

JS Video Playback SDK

The JS video playback SDK provides interfaces for real-time video and playback in the HTML5 environment. The JS video playback SDK requires the www/js/h5splayer.js reference package. Refer to the www/rtc.html example.This section introduces the relevant interfaces.The following are relevant examples. You can open ws.html and rtc.html to refer to the relevant code.

http://localhost:8080/ws.html?token=token2

http://localhost:8080/rtc.html?token=token2

http://localhost:8080/ws.html?token=token2&stream=main

http://localhost:8080/rtc.html?token=token2&stream=sub

If you need to automatically play, starting from r11.3, ws.html and rtc.html support automatic playback, and you can add autoplay=true.

http://192.168.100.122:8080/rtc.html?token=token1&autoplay=true

http://192.168.100.122:8080/ws.html?token=token1&autoplay=true

http://localhost:8080/rtmp.html?token=token2

http://localhost:8080/rtmp2.html?token=token2

The token needs to be replaced with the configured token or generated token. If it is an NVR or platform device, you can view the corresponding token in the management interface Settings -> Devices -> All.Or use GetDeviceSrc/GetGbDeviceSrc/GetCloudDeviceSrc to obtain them separately.For specific usage methods, please refer to the API documentation.

If authentication is enabled for the service, you need to obtain a session from the Login API and keep it alive using the Keepalive API (the default timeout is 600 seconds). To add a session to the original address, use the following command format.

http://192.168.100.145:8080/ws.html?token=1d4f&session=4ec47fb4-a74a-4e02-96a1-369151cfcb09


用户登录_2_2_3_2_2_2_2_2_2_3_3_2_5_2_2

Interface Description

The javascript interface parameters are as follows:

var conf = {

videoid:'h5sVideo1', //{string} - id of the video element tag

videodom: h5svideodom1, //{object} - video dom. if there has videoid, just use the videoid

protocol: window.location.protocol, // {string} - 'http:' or 'https:'

host: window.location.host, //{string} - 'localhost:8080'

rootpath:window.location.pathname, // {string} - path of the app running

token:'token1', // {string} - token of stream

streamprofile: 'main', // {string} - stream profile, main/sub or other predefine transcoding profile

pbconf: pbconf1, //This is optional, if no pbconf, this will be live.

hlsver:'v1', //{string} - v1 is for ts, v2 is for fmp4

session:'c1782caf-b670-42d8-ba90-2244d0b0ee83', //{string} - session got from login

consolelog: 'true' // 'true' or 'false' enable/disable console.log

};

Parameters

Name | Type | Parameter mandatory | Description
videoid | string | optional | HTML5 video element id，videoid和videodom either-or
videodom | string | optional | HTML5 video DOM，videoid和videodom either-or
protocol | string | must | agreement 'http:' or 'https:'
host | string | must | Service Host 'localhost:8080' or '192.168.1.1:8080'
rootpath | string | must | API root path, the default is '/'. If the service is proxied, fill in the proxied path
token | string | must | Video source token
streamprofile | string | optional | main/sub or predefined transcoding profile token, effective for real-time video
pbconf | string | optional | The playback configuration item is empty in real time. For the specific format, refer to the playback video interface parameters
hlsver | string | optional | Outdated parameter, keep 'v1'
session | string | must | Session obtained by Login
consolelog | string | optional | Whether to enable the playback of SDK logs, enabled by default

Examples

Please refer to the example at www/rtc.html.


用户登录_2_2_3_2_2_2_2_2_2_3_3_2_5_2_2_2

Description

The javascript interface parameters are as follows. Remote playback refers to playback from NVR or third-party platforms, while service playback refers to playback from H5S video data.

function PlaybackCB(event, userdata)

{

var msgevent = JSON.parse(event);

if (msgevent.type === 'H5S_EVENT_PB_TIME')

{

}

if (msgevent.type === 'H5S_EVENT_PB_SESSION_ID')

{

}

}

var pbconf1 = {

begintime: '2019-03-23T120101+08',//{string} begintime 0 for fileplayback

endtime: '2019-03-23T150101+08',//{string} endtime 0 for fileplayback

autoplay: 'true', // 'true' or 'false' for playback autoplay

showposter: 'true', //'true' or 'false' show poster

serverpb: 'true', //'true' or 'false' playback from h5stream record, default false

filename: 'token1.mp4', // file name need to playback (begintime == 0 & endtime == 0 and serverpb is true)

callback: PlaybackCB, //{function}(event(string), userdata(object))

userdata: user data // user data

};

var conf = {

videoid:'h5sVideo1', //{string} - id of the video element tag

videodom: h5svideodom1, //{object} - video dom. if there has videoid, just use the videoid

protocol: window.location.protocol, // {string} - 'http:' or 'https:'

host: window.location.host, //{string} - 'localhost:8080'

rootpath:window.location.pathname, // {string} - path of the app running

token:'token1', // {string} - token of stream

streamprofile: 'main', // {string} - stream profile, main/sub or other predefine transcoding profile

pbconf: pbconf1, //This is optional, if no pbconf, this will be live.

hlsver:'v1', //{string} - v1 is for ts, v2 is for fmp4

session:'c1782caf-b670-42d8-ba90-2244d0b0ee83', //{string} - session got from login

consolelog: 'true' // 'true' or 'false' enable/disable console.log

};

Parameters

The conf interface parameters refer to the real-time video interface parameters, as shown below for playback parameters:

Name | Type | Parameter mandatory | Description
begintime | string | must | Playback start time, ISO 8601 format
endtime | string | must | Playback end time, ISO 8601 format
autoplay | string | must | Whether to play automatically
showposter | string | must | Whether to display the latest data frame of the video source cache
serverpb | string | must | Is it service playback or remote playback
filename | string | optional | When both begintime and endtime are '0', it means playback by file name. When playing back by file name, filename is the file name returned by the video command, such as"strFileName": "107-e88c9fae-2c56-4329-b9e2-ec99dd36ab9d.mp4"
callback | function | must | Replay event callback
userdata | object | must | Replay event callback parameters

The callback function will provide the current playback information. The specific event description is as follows:

Type | Description
H5S_EVENT_PB_SESSION_ID | Replay the session ID, which is called before the playback data starts. You can use PbSnapshot to capture the data that was replayed at that time
H5S_EVENT_PB_TIME | Playback progress, call every second

Examples

For remote playback, please refer to www/playback2.html

For file-based playback during service playback, refer to www/serverfilepb.html

For time-based playback during service playback, refer to www/serverpb.html


用户登录_2_2_3_2_2_2_2_2_2_3_3_2_5_2_2_2_2

Description

The javascript interface parameters are as follows:

function H5sPlayerWS(conf)

H5sPlayerWS.prototype.connect

H5sPlayerWS.prototype.disconnect

Playback Control

H5sPlayerWS.prototype. start

H5sPlayerWS.prototype. pasue

H5sPlayerWS.prototype. resume

Parameters

The conf parameter refers to the real-time video interface parameters and playback video interface parameters. When WS is used for playback, control and speed-up are not supported.

Examples

You can refer to the example at www/ws.html.


用户登录_2_2_3_2_2_2_2_2_2_3_3_2_5_2_2_2_2_2

Description

The javascript interface parameters are as follows:

function H5sPlayerRTC(conf)

H5sPlayerRTC.prototype.connect

H5sPlayerRTC.prototype.disconnect

Playback Control

H5sPlayerRTC.prototype. start

H5sPlayerRTC.prototype. pasue

H5sPlayerRTC.prototype. resume

H5sPlayerRTC.prototype. speed(x) //x 0.5 1 2 4 8 16

H5sPlayerRTC.prototype. seek(x) //x 相对开始回放时间的偏移 单位为秒

Parameters

For the conf parameter, refer to the real-time video interface parameters and playback video interface parameters.

Examples

You can refer to the example at www/rtc.html.


Appendix A FAQ

1.Is there any naming rule for tokens in h5s?

The token of h5s is composed of letters and numbers, supports a single hyphen and underscore, and does not support special characters (such as @#$ etc.).Correct examples include token1_1 and token1-1.Double hyphens are not supported, such as token1--1.


添加DB33下级域

接口描述

添加下级域

使用说明

请求方法 | POST
请求URL | /api/v1/Cascade/Add/DB33
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
d3Type | string | 必须 | d3类型
d3rId | string | 必须 | d3ID
authType | string | 必须 | 授权类型
d3StreamType | string | 必须 | 流媒体协议
devPartitionId | string | 必须 | 设备分区id
name | string | 必须 | 名称
sipUser | string | 必须 | SIP用户
password | string | 必须 | 密码
devIP | string | 必须 | IP地址
devPort | string | 必须 | 端口
enableAudio | bool | 必须 | 开启音频
checkIpPort | bool | 必须 | 检查IP端口
timeout | int | 必须 | 超时时间
autoReqCatalog | bool | 必须 | 自动请求目录
centralRecord | bool | 必须 | 中心存储
description | string | 必须 | 备注
enabled | bool | 必须 | 开启

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/Cascade/Add/DB33

{

  "d3Type": "H5_CAS_DB33_2011",

  "d3Id": "130101000020000099",

  "authType": "H5_CAS_AUTH_DIGEST_MD5",

  "d3StreamType": "H5_CAS_STREAM_UDP",

  "devPartitionId": 10000,

  "name": "DB33/T629 Device1",

  "sipUser": "130101000020000099",

  "password": "admin12345",

  "devIP": "192.168.100.86",

  "devPort": "5060",

  "enableAudio": false,

  "checkIpPort": false,

  "timeout": 7200,

  "centralRecord":false,

  "description": "DB33/T629 Device1",

  "enabled": true

}

返回的参数

{

  "code": 0,

  "msg": "Success"


添加GB/T28181下级域

接口描述

添加GB/T28181下级域

使用说明

请求方法 | POST
请求URL | /api/v1/Cascade/Add/GB
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
gbType | string | 必须 | 国标类型
gbId | string | 必须 | 国标ID
authType | string | 必须 | 授权类型
gbStreamType | string | 必须 | 流媒体协议
devPartitionId | string | 必须 | 设备分区id
name | string | 必须 | 名称
sipUser | string | 必须 | SIP用户
password | string | 必须 | 密码
devIP | string | 必须 | IP地址
devPort | string | 必须 | 端口
enableAudio | bool | 必须 | 开启音频
checkIpPort | bool | 必须 | 检查IP端口
timeout | int | 必须 | 超时时间
autoReqCatalog | bool | 必须 | 自动请求目录
centralRecord | bool | 必须 | 中心存储
description | string | 必须 | 备注
enabled | bool | 必须 | 开启

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/Cascade/Add/GB

{

  "gbType": "H5_CAS_GBT_2016",

  "gbId": "31020000001320000181",

  "authType": "H5_CAS_AUTH_DIGEST_MD5",

  "gbStreamType": "H5_CAS_STREAM_UDP",

  "devPartitionId": 10000,

  "name": "GB Device1",

  "sipUser": "admin1",

  "password": "admin12345",

  "devIP": "192.168.100.86",

  "devPort": "5060",

  "enableAudio": false,

  "checkIpPort": false,

  "timeout": 7200,

  "autoReqCatalog":false,

  "centralRecord":false,

  "description": "GB Device1",

  "enabled": true

}

返回的参数

{

  "code": 0,

  "msg": "Success"


添加国网B下级域

接口描述

添加国网B下级域

使用说明

请求方法 | POST
请求URL | /api/v1/Cascade/Add/GR
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
grType | string | 必须 | 国网类型
grId | string | 必须 | 国网ID
authType | string | 必须 | 授权类型
grStreamType | string | 必须 | 流媒体协议
devPartitionId | string | 必须 | 设备分区id
name | string | 必须 | 名称
sipUser | string | 必须 | SIP用户
password | string | 必须 | 密码
devIP | string | 必须 | IP地址
devPort | string | 必须 | 端口
enableAudio | bool | 必须 | 开启音频
checkIpPort | bool | 必须 | 检查IP端口
timeout | int | 必须 | 超时时间
autoReqCatalog | bool | 必须 | 自动请求目录
centralRecord | bool | 必须 | 中心存储
description | string | 必须 | 备注
enabled | bool | 必须 | 开启

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/Cascade/Add/GR

{

  "grType": "H5_CAS_GRID_2019",

  "grId": "010010000103010001",

  "authType": "H5_CAS_AUTH_DIGEST_MD5",

  "grStreamType": "H5_CAS_STREAM_UDP",

  "devPartitionId": 10000,

  "name": "STATE GRID Device1",

  "sipUser": "010010000103010001",

  "password": "admin12345",

  "devIP": "192.168.100.86",

  "devPort": "5060",

  "enableAudio": false,

  "checkIpPort": false,

  "timeout": 7200,

  "centralRecord":false,

  "description": "STATE GRID Device1",

  "enabled": true

}

返回的参数

{

  "code": 0,

  "msg": "Success"


级联分区移动位置

接口描述

级联分区移动位置

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/CasPartition/Move
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
origCasPartitionId | int | 必须 | 移动的级联分区id
toCasPartitionId | int | 必须 | 移动的级联分区id

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

PUT http://192.168.100.127:8085/api/v1/Cascade/CasPartition/Move?origDevPartitionId=10002&toDevPartitionId=10004

返回的参数

{

  "code": 0,

  "msg": "Success",


DB33下级域

DB33下级域数据格式

字段 | 数据类型 | 描述
d3Type | string | d3类型
d3Id | string | d3ID
authType | string | 授权类型
d3StreamType | string | 流媒体协议
devPartitionId | string | 设备分区id
name | string | 名称
sipUser | string | SIP用户
password | string | 密码
devIP | string | IP地址
devPort | string | 端口
enableAudio | bool | 开启音频
checkIpPort | bool | 检查IP端口
timeout | int | 超时时间
autoReqCatalog | bool | 自动请求目录
centralRecord | bool | 中心存储
description | string | 备注
enabled | bool | 开启


删除DB33下级域

接口描述

删除DB33下级域

使用说明

请求方法 | DELETE
请求URL | /api/v1/Cascade
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
ids | string | 必须 | 下级域id

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

DELETE http://192.168.100.127:8085/api/v1/Cascade

{

  "ids": [ 2]

}}

返回的参数

{

  "code": 0,

  "msg": "Success"


删除GB/T28181下级域

接口描述

删除GB/T28181下级域

使用说明

请求方法 | DELETE
请求URL | /api/v1/Cascade
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
ids | string | 必须 | 下级域id

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

DELETE http://192.168.100.127:8085/api/v1/Cascade

{

  "ids": [ 2]

}}

返回的参数

{

  "code": 0,

  "msg": "Success"


删除国网B下级域

接口描述

删除国网B下级域

使用说明

请求方法 | DELETE
请求URL | /api/v1/Cascade
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
ids | string | 必须 | 下级域id

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

DELETE http://192.168.100.127:8085/api/v1/Cascade

{

  "ids": [ 2]

}}

返回的参数

{

  "code": 0,

  "msg": "Success"


获取GB/T28181服务配置

接口描述

获取GB/T28181服务配置

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/GBCascadeConf
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
bEnable | bool | 开启
strGbID | string | 国标id
strRealm | string | 服务器域
strGbServerIpAddr | string | 国标服务器地址
nGbServerPort | int | 国标服务器端口
bTCP | bool | TCP
bUDP | bool | UDP
nPortRangeMin | int | 端口最小范围
nPortRangeMax | int | 端口最大范围

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/GBCascadeConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "conf": {

          "bEnable": true,

          "strGbID": "34020000002000000001",

          "strRealm": "3402000000",

          "strGbServerIpAddr": "192.168.100.139",

          "nGbServerPort": 5160,

          "bTCP": false,

          "bUDP": true,

          "nPortRangeMin": 55000,

          "nPortRangeMax": 55999


获取GB/T35114服务配置

接口描述

获取GB/T35114服务配置

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/GB35114CascadeConf
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
bEnable | bool | 开启
strGbID | string | 国标id
strRealm | string | 服务器域
strGbServerIpAddr | string | 国标服务器地址
nGbServerPort | int | 国标服务器端口
bTCP | bool | TCP
bUDP | bool | UDP
nPortRangeMin | int | 端口最小范围
nPortRangeMax | int | 端口最大范围
strSmDevName | string | SM证书名称
strSmDevType | string | SM证书类型

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/GB35114CascadeConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "conf": {

          "bEnable": false,

          "strGbID": "34020000002000000001",

          "strRealm": "3402000000",

          "strGbServerIpAddr": "192.168.100.103",

          "nGbServerPort": 5164,

          "bTCP": false,

          "bUDP": true,

          "nPortRangeMin": 56000,

          "nPortRangeMax": 56999,

          "strSmDevName": "None",

          "strSmDevType": "H5_SM_DEV_NONE"


获取GB/T35114 SM证书

接口描述

获取GB/T35114 SM证书

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/List/SmDev
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
strDevName | string | SM证书名称
strType | string | SM证书类型

使用示例

GET http://192.168.100.127:8085/api/v1/List/SmDev?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "dev": [

           {

              "strDevName": "48A3C370734822D7A45BEE4E96BB68A",

              "strType": "H5_SM_DEV_SKF"

           }

       ]


更新GB/T35114服务配置

接口描述

更新GB/T35114服务配置

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/GB35114CascadeConf
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器
bEnable | bool | 必须 | 开启
strGbID | string | 必须 | 国标id
strRealm | string | 必须 | 服务器域
strGbServerIpAddr | string | 必须 | 国标服务器地址
nGbServerPort | int | 必须 | 国标服务器端口
bTCP | bool | 必须 | TCP
bUDP | bool | 必须 | UDP
nPortRangeMin | int | 必须 | 端口最小范围
nPortRangeMax | int | 必须 | 端口最大范围
strSmDevName | string | 必须 | SM证书名称
strSmDevType | string | 必须 | SM证书类型

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

PUT http://192.168.100.127:8085/api/v1/Cascade/GB35114CascadeConf

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "bEnable": false,

  "strGbID": "34020000002000000001",

  "strRealm": "3402000000",

  "strGbServerIpAddr": "192.168.100.145",

  "nGbServerPort": 5164,

  "bTCP": true,

  "bUDP": true,

  "nPortRangeMin": 56001,

  "nPortRangeMax": 56999,

  "strSmDevName": "48A3C370734822D7A45BEE4E96BB68A",

  "strSmDevType": "H5_SM_DEV_SKF"

}

返回的参数

{

  "code": 0,

  "msg": "Success"


GB/T28181下级域

GB/T28181下级域数据格式

字段 | 数据类型 | 描述
gbType | string | 国标类型
gbId | string | 国标ID
authType | string | 授权类型
gbStreamType | string | 流媒体协议
devPartitionId | string | 设备分区id
name | string | 名称
sipUser | string | SIP用户
password | string | 密码
devIP | string | IP地址
devPort | string | 端口
enableAudio | bool | 开启音频
checkIpPort | bool | 检查IP端口
timeout | int | 超时时间
autoReqCatalog | bool | 自动请求目录
centralRecord | bool | 中心存储
description | string | 备注
enabled | bool | 开启


获取DB33服务配置

接口描述

获取DB33服务配置

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/DB33CascadeConf
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
bEnable | bool | 开启
strGrID | string | D3id
strRealm | string | 服务器域
strGrServerIpAddr | string | D3服务器地址
nGrServerPort | int | D3服务器端口
bTCP | bool | TCP
bUDP | bool | UDP
nPortRangeMin | int | 端口最小范围
nPortRangeMax | int | 端口最大范围

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/GRCascadeConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "conf": {

          "bEnable": false,

          "strD3ID": "130101000020000199",

          "strRealm": "db33.com",

          "strD3ServerIpAddr": "192.168.100.103",

          "nD3ServerPort": 5360,

          "bTCP": false,

          "bUDP": true,

          "nPortRangeMin": 58000,

          "nPortRangeMax": 58999


获取DB33下级域列表

接口描述

获取DB33下级域列表

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/List/DB33
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
pageSize | int | 可选 | 每页多少条数据 默认10条
pageIndex | int | 可选 | 第几页 默认第一页

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
pageSize | int | 每页多少条数据
pageIndex | int | 第几页
result | array | 参考DB33下级域数据格式

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/List/GB?pageSize=100

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 1,

      "pageIndex": 1,

      "pageSize": 100,

      "list": [

           {

              "devId": 1,

              "devPartitionId": 10000,

              "token": "620d7f0c-a95b-46e6-99b9-22790f1e3a94",

              "nodeId": "",

              "name": "STATE GRID Device1",

              "casType": "H5_CAS_GRID_2019",

              "authType": "H5_CAS_AUTH_DIGEST_MD5",

              "grId": "010010000103010001",

              "sipUser": "admin1",

              "password": "admin12345",

              "passwordEncrypted": false,

              "checkIpPort": false,

              "devIP": "192.168.100.86",

              "devPort": "5060",

              "devRealIP": "192.168.100.86",

              "devRealPort": "5060",

              "devRealVer": "",

              "streamType": "H5_CAS_STREAM_UDP",

              "enableAudio": false,

              "enabled": true,

              "online": false,

              "description": "STATE GRID Device1",

              "crt": "",

              "timeout": 7200,

              "autoReqCatalog": false,

              "centralRecord": false

           }

       ]


获取GB/T28181下级域列表

接口描述

获取GB/T28181下级域列表

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/List/GB
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
pageSize | int | 可选 | 每页多少条数据 默认10条
pageIndex | int | 可选 | 第几页 默认第一页

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
pageSize | int | 每页多少条数据
pageIndex | int | 第几页
result | array | 参考下级域数据格式

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/List/GB?pageSize=100

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 1,

      "pageIndex": 1,

      "pageSize": 100,

      "list": [

           {

              "devId": 2,

              "devPartitionId": 10000,

              "token": "3a7bccfb-cb7a-4a59-85f6-d1efbb212c55",

              "nodeId": "",

              "name": "GB Device1",

              "casType": "H5_CAS_GBT_2016",

              "authType": "H5_CAS_AUTH_DIGEST_MD5",

              "gbId": "31020000001320000181",

              "sipUser": "admin1",

              "password": "admin12345",

              "passwordEncrypted": false,

              "checkIpPort": false,

              "devIP": "192.168.100.86",

              "devPort": "5060",

              "devRealIP": "192.168.100.86",

              "devRealPort": "5060",

              "devRealVer": "",

              "streamType": "H5_CAS_STREAM_UDP",

              "enableAudio": false,

              "enabled": true,

              "online": false,

              "description": "GB Device1",

              "crt": "",

              "timeout": 7200,

              "autoReqCatalog": false,

              "centralRecord": false,

              "createdAt": "2024-08-26T14:31:09.685833+08:00",

              "updatedAt": "2024-08-26T14:31:09.688501+08:00"

           }

       ]


获取国网B下级域列表

接口描述

获取国网B下级域列表

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/List/GR
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
pageSize | int | 可选 | 每页多少条数据 默认10条
pageIndex | int | 可选 | 第几页 默认第一页

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
pageSize | int | 每页多少条数据
pageIndex | int | 第几页
result | array | 参考国网下级域数据格式

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/List/GB?pageSize=100

返回的参数

{

  "code": 0,

  "msg": "Success",

  "result": {

      "count": 1,

      "pageIndex": 1,

      "pageSize": 100,

      "list": [

           {

              "devId": 1,

              "devPartitionId": 10000,

              "token": "620d7f0c-a95b-46e6-99b9-22790f1e3a94",

              "nodeId": "",

              "name": "STATE GRID Device1",

              "casType": "H5_CAS_GRID_2019",

              "authType": "H5_CAS_AUTH_DIGEST_MD5",

              "grId": "010010000103010001",

              "sipUser": "admin1",

              "password": "admin12345",

              "passwordEncrypted": false,

              "checkIpPort": false,

              "devIP": "192.168.100.86",

              "devPort": "5060",

              "devRealIP": "192.168.100.86",

              "devRealPort": "5060",

              "devRealVer": "",

              "streamType": "H5_CAS_STREAM_UDP",

              "enableAudio": false,

              "enabled": true,

              "online": false,

              "description": "STATE GRID Device1",

              "crt": "",

              "timeout": 7200,

              "autoReqCatalog": false,

              "centralRecord": false

           }

       ]


获取国网B服务配置

接口描述

获取国网B服务配置

使用说明

请求方法 | GET
请求URL | /api/v1/Cascade/GRCascadeConf
请求数据 | 无

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述
bEnable | bool | 开启
strGrID | string | 国网id
strRealm | string | 服务器域
strGrServerIpAddr | string | 国网服务器地址
nGrServerPort | int | 国网服务器端口
bTCP | bool | TCP
bUDP | bool | UDP
nPortRangeMin | int | 端口最小范围
nPortRangeMax | int | 端口最大范围

使用示例

GET http://192.168.100.127:8085/api/v1/Cascade/GRCascadeConf?nodeId=e09422f7-813e-4483-a551-3ee81a944ae9

返回的参数

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "bEnable": true,

  "strGrID": "010010000101000001",

  "strRealm": "grid.com",

  "strGrServerIpAddr": "192.168.100.145",

  "nGrServerPort": 5260,

  "bTCP": false,

  "bUDP": true,

  "nPortRangeMin": 57001,

  "nPortRangeMax": 57999


请求目录

接口描述

请求目录

使用说明

请求方法 | POST
请求URL | /api/v1/ReqCatalog/GR
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
grId | string | 必须 | 国标id

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/ReqCatalog/GR

{

  "gbId": "34020000001110000196"

}

返回的参数

{

  "code": 0,

  "msg": "Success"


国网B下级域

国网B下级域数据格式

字段 | 数据类型 | 描述
grType | string | gr类型
grId | string | 国网ID
authType | string | 授权类型
grStreamType | string | 流媒体协议
devPartitionId | string | 设备分区id
name | string | 名称
sipUser | string | SIP用户
password | string | 密码
devIP | string | IP地址
devPort | string | 端口
enableAudio | bool | 开启音频
checkIpPort | bool | 检查IP端口
timeout | int | 超时时间
autoReqCatalog | bool | 自动请求目录
centralRecord | bool | 中心存储
description | string | 备注
enabled | bool | 开启


更新DB33服务配置

接口描述

更新DB33服务配置

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/DB33CascadeConf
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器
bEnable | bool | 必须 | 开启
strD3ID | string | 必须 | 国网id
strRealm | string | 必须 | 服务器域
strD3ServerIpAddr | string | 必须 | 国网服务器地址
nD3ServerPort | int | 必须 | 国网服务器端口
bTCP | bool | 必须 | TCP
bUDP | bool | 必须 | UDP
nPortRangeMin | int | 必须 | 端口最小范围
nPortRangeMax | int | 必须 | 端口最大范围

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

PUT http://192.168.100.127:8085/api/v1/Cascade/DB33CascadeConf

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "bEnable": true,

  "strD3ID": "010010000101000001",

  "strRealm": "db33.com",

  "strD3ServerIpAddr": "192.168.100.145",

  "nD3ServerPort": 5260,

  "bTCP": false,

  "bUDP": true,

  "nPortRangeMin": 57001,

  "nPortRangeMax": 57999

}

返回的参数

{

  "code": 0,

  "msg": "Success"


更新DB33下级域

接口描述

更新DB33下级域

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/DB33/Update
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | int | 必须 | 下级域id
d3Type | string | 必须 | d3类型
d3Id | string | 必须 | d3ID
authType | string | 必须 | 授权类型
d3StreamType | string | 必须 | 流媒体协议
devPartitionId | string | 必须 | 设备分区id
name | string | 必须 | 名称
sipUser | string | 必须 | SIP用户
password | string | 必须 | 密码
devIP | string | 必须 | IP地址
devPort | string | 必须 | 端口
enableAudio | bool | 必须 | 开启音频
checkIpPort | bool | 必须 | 检查IP端口
timeout | int | 必须 | 超时时间
autoReqCatalog | bool | 必须 | 自动请求目录
centralRecord | bool | 必须 | 中心存储
description | string | 必须 | 备注
enabled | bool | 必须 | 开启

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/Cascade/GB/Update

{

  "devId":1,

  "d3Type": "H5_CAS_DB33_2011",

  "d3Id": "130101000020000299",

  "authType": "H5_CAS_AUTH_DIGEST_MD5",

  "d3StreamType": "H5_CAS_STREAM_UDP",

  "devPartitionId": 10000,

  "name": "DB33/T629 Device1",

  "sipUser": "130101000020000199",

  "password": "admin12345",

  "devIP": "192.168.100.86",

  "devPort": "5060",

  "enableAudio": false,

  "checkIpPort": false,

  "timeout": 7200,

  "centralRecord":false,

  "description": "DB33/T629 Device1",

  "enabled": true

}

返回的参数

{

  "code": 0,

  "msg": "Success"


更新GB/T28181服务配置

接口描述

更新GB/T28181服务配置

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/GBCascadeConf
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器
bEnable | bool | 必须 | 开启
strGbID | string | 必须 | 国标id
strRealm | string | 必须 | 服务器域
strGbServerIpAddr | string | 必须 | 国标服务器地址
nGbServerPort | int | 必须 | 国标服务器端口
bTCP | bool | 必须 | TCP
bUDP | bool | 必须 | UDP
nPortRangeMin | int | 必须 | 端口最小范围
nPortRangeMax | int | 必须 | 端口最大范围

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

PUT http://192.168.100.127:8085/api/v1/Cascade/GBCascadeConf

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "bEnable": true,

  "strGbID": "34020000002000000001",

  "strRealm": "3402000000",

  "strGbServerIpAddr": "192.168.100.145",

  "nGbServerPort": 5160,

  "bTCP": true,

  "bUDP": true,

  "nPortRangeMin": 55001,

  "nPortRangeMax": 55999

}

返回的参数

{

  "code": 0,

  "msg": "Success"


更新国网B服务配置

接口描述

更新国网B服务配置

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/GRCascadeConf
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
nodeId | string | 必须 | 归属服务器
bEnable | bool | 必须 | 开启
strGbID | string | 必须 | 国标id
strRealm | string | 必须 | 服务器域
strGbServerIpAddr | string | 必须 | 国标服务器地址
nGbServerPort | int | 必须 | 国标服务器端口
bTCP | bool | 必须 | TCP
bUDP | bool | 必须 | UDP
nPortRangeMin | int | 必须 | 端口最小范围
nPortRangeMax | int | 必须 | 端口最大范围

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

PUT http://192.168.100.127:8085/api/v1/Cascade/GBCascadeConf

{

  "nodeId": "e09422f7-813e-4483-a551-3ee81a944ae9",

  "bEnable": true,

  "strGrID": "010010000101000001",

  "strRealm": "grid.com",

  "strGrServerIpAddr": "192.168.100.145",

  "nGrServerPort": 5260,

  "bTCP": false,

  "bUDP": true,

  "nPortRangeMin": 57001,

  "nPortRangeMax": 57999

}

返回的参数

{

  "code": 0,

  "msg": "Success"


更新GB/T28181下级域

接口描述

更新GB/T28181下级域

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/GB/Update
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
devId | int | 必须 | 下级域id
gbType | string | 必须 | 国标类型
gbId | string | 必须 | 国标ID
authType | string | 必须 | 授权类型
gbStreamType | string | 必须 | 流媒体协议
devPartitionId | string | 必须 | 设备分区id
name | string | 必须 | 名称
sipUser | string | 必须 | SIP用户
password | string | 必须 | 密码
devIP | string | 必须 | IP地址
devPort | string | 必须 | 端口
enableAudio | bool | 必须 | 开启音频
checkIpPort | bool | 必须 | 检查IP端口
timeout | int | 必须 | 超时时间
autoReqCatalog | bool | 必须 | 自动请求目录
centralRecord | bool | 必须 | 中心存储
description | string | 必须 | 备注
enabled | bool | 必须 | 开启

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/Cascade/GB/Update

{

  "devId":2,

  "gbType": "H5_CAS_GBT_2016",

  "gbId": "31020000001320000181",

  "authType": "H5_CAS_AUTH_DIGEST_MD5",

  "gbStreamType": "H5_CAS_STREAM_UDP",

  "devPartitionId": 10000,

  "name": "GB Device3",

  "sipUser": "admin1",

  "password": "admin12345",

  "devIP": "192.168.100.86",

  "devPort": "5060",

  "enableAudio": false,

  "checkIpPort": false,

  "timeout": 7200,

  "autoReqCatalog":false,

  "centralRecord":false,

  "description": "GB Device 2",

  "enabled": true

}

返回的参数

{

  "code": 0,

  "msg": "Success"


更新国网B下级域

接口描述

更新国网B下级域

使用说明

请求方法 | PUT
请求URL | /api/v1/Cascade/GB/Update
请求数据 | application/json;charset=UTF-8

请求参数

字段 | 数据类型 | 参数要求 | 描述
devId | int | 必须 | 下级域id
grType | string | 必须 | 国网类型
grId | string | 必须 | 国网ID
authType | string | 必须 | 授权类型
grStreamType | string | 必须 | 流媒体协议
devPartitionId | string | 必须 | 设备分区id
name | string | 必须 | 名称
sipUser | string | 必须 | SIP用户
password | string | 必须 | 密码
devIP | string | 必须 | IP地址
devPort | string | 必须 | 端口
enableAudio | bool | 必须 | 开启音频
checkIpPort | bool | 必须 | 检查IP端口
timeout | int | 必须 | 超时时间
autoReqCatalog | bool | 必须 | 自动请求目录
centralRecord | bool | 必须 | 中心存储
description | string | 必须 | 备注
enabled | bool | 必须 | 开启

响应参数

字段 | 数据类型 | 描述
code | int | 0表示成功
msg | string | 成功或者失败的原因描述

使用示例

POST http://192.168.100.127:8085/api/v1/Cascade/GB/Update

{

  "devId":2,

  "gbType": "H5_CAS_GBT_2016",

  "gbId": "31020000001320000181",

  "authType": "H5_CAS_AUTH_DIGEST_MD5",

  "gbStreamType": "H5_CAS_STREAM_UDP",

  "devPartitionId": 10000,

  "name": "GB Device3",

  "sipUser": "admin1",

  "password": "admin12345",

  "devIP": "192.168.100.86",

  "devPort": "5060",

  "enableAudio": false,

  "checkIpPort": false,

  "timeout": 7200,

  "autoReqCatalog":false,

  "centralRecord":false,

  "description": "GB Device 2",

  "enabled": true

}

返回的参数

{

  "code": 0,

  "msg": "Success"