icon Created with Sketch.

Interface documentation

bvApi
  • Authentication
    • User login
    • logout
    • Refresh token
    • Get logged information
    • Modify own password
    • Get device login QR code
  • user
    • Get root user group information
    • Get user group information
    • Get list of user groups
    • Get user list
    • Get a list of online users
    • Get user online status
    • Get the user's current location
    • Get user information
  • Role
    • Get role list
    • Get role information
    • Creating a Role
    • Modify role
    • Delete role
    • Get the role resource list
    • Add role resources
    • Delete role resources
  • User Management
    • Create user group
    • Modify user group
    • Delete user group
    • Obtain user information requirements
    • Check create request is available
    • Create user
    • Modify user
    • delete users
    • Change user password
    • Kick user offline
    • Get user resource list
    • Add user resources
    • Delete user resources
  • Device
    • Get root device group information
    • Get list of device groups
    • Get device group information
    • Get device class list
    • Get device class information
    • Get device list
    • Get device information
    • Get device online status
    • Get device location
    • Get battery information
    • Transparent command
    • Manual recording-start
    • Capture a picture manually
    • Manual recording-stop
  • Device management
    • Create device group
    • Get common configuration
    • Set common configuration
    • Modify device group
    • Delete device group
    • Modify basic device information
    • Modify device channel information
    • Add device
    • Remove device
    • Reboot the device
    • Create device class
    • Modify device class
    • Delete Calss
    • Kick online device offline
    • Set power configuration
    • Get Ethernet configuration
    • Set up Ethernet configuration
    • Get Wifi configuration
    • Set Wifi configuration
    • Get wireless network configuration
    • Set wireless network configuration
    • Get snapshot configuration
    • Set snapshot configuration
    • Get audio input configuration
    • Set audio input configuration
    • Get audio output
    • Set audio output
    • Get encoding properties
    • Set encoding properties
    • Get video source
    • Set video source
    • Get device GPS configuration
    • Set device GPS configuration
    • Get device server configuration
    • Set device server configuration
    • Get device memory information
    • Set device memory information
    • Get formatting progress
    • Format memory
    • Get device storage settings
    • Modify device storage settings
    • Get storage status
    • Get storage plan
    • Set storage plan
    • Get overlay information
    • Set overlay information
    • Get upgrade firmware status
    • Upgrade firmware
    • Get law enforcement
    • Set law enforcement
    • Get sensor data
    • Set sensor data
  • PTZ
    • PTZ lens control
    • Get the PTZ preset point list
    • Add PTZ preset point
    • Modify PTZ preset point
    • Delete PTZ preset point operation
    • Go to PTZ preset point
    • Get the list of PTZ cruise routes
    • Add gimbal cruise route
    • Start the PTZ cruise route
    • Stop the gimbal cruise route
    • Delete gimbal cruise route
  • IM group
    • Get group list
    • Get list of group members
    • Get group member information
    • Get group information
    • Create group
    • Edit group
    • Delete group
    • Add group members
    • Delete group members
    • Modify other group members
    • Modify your group nickname
    • Create meeting
    • Delete meeting
    • Get meeting information
    • Get the list of meeting members
    • Get conference member information
    • Join the meeting yourself
    • Exit the meeting yourself
    • Apply to speak
    • End speech
    • Invite others to join a meeting
    • Kick someone from a meeting
    • Name others to speak
    • Get default conference
    • Add default meeting
    • Delete default meeting
  • instant messaging
    • Send newsletter
    • Confirm message has been read
    • Check my chat history
    • Advanced query of chat history
    • Query read ID
  • websocket
    • Online status subscription
    • Alarm event subscription
    • Instant messaging subscription
    • Device location subscription
    • Meeting event subscription
    • Command interactive subscription
  • historical data
    • Platform file retrieval
    • Get video file information
    • Modify video file information
    • Handle alarm
    • alarm record
    • Device GPS track
    • Device file retrieval
    • Download device files
    • Delete device files
    • Device online/offline logs
    • User online/offline logs
    • Device online/offline logs (extend)
    • User online/offline logs (extend)
    • Operation log
    • System alarm record
  • electric fence
    • Modify platform fence
    • Create a platform fence
    • Delete fence device
    • Remove platform fence
    • Add fence equipment
    • Get fence information
    • Get list of fences
    • Get a list of fence equipment
  • Video file timeline
    • add
    • delete
    • Inquire
  • Platform Storage (Download) Plan
    • Download plan--Add
    • Download plan--get
    • Download plan--Modify
    • Download plan--query
    • Download plan--Delete
    • Recording plan--Add
    • Video plan--get
    • Video plan--Modify
    • Video plan--query
    • Recording plan--Delete
    • Plan device--Modify
    • Plan device--Add
    • Plan device--Delete
    • Planning device--query
    • Plan device--query not associated
    • Manual recording--Start
    • Manual recording--end
  • Media stream
    • Close session
    • Open device stream webrtc
    • Open device stream bvrtc
    • Open conference stream webrtc
    • Open conference stream bvrtc
    • Open conference stream websocket
    • Open playback stream
    • Playback control
    • Get dialog list
    • Get session information
    • Check out the list of streaming services
    • Reset streaming service statistics
  • Contact person
    • Unpin
    • Add pin
    • Get pinned list
  • module program
    • cs app query
    • cs app Batch Edit
    • cs app modification
    • webapp query
    • webapp Get home page
    • webapp set home page
    • webapp Get configuration
    • webapp settings configuration
    • plugapp query
    • module query
  • Black and white list
    • Modify black/white list
    • Delete black/white list
    • Add black/white list
    • Get black/white list
    • Get black/white list
  • Platform storage status
    • Download plan list
    • Download plan device list
    • Downloading list
    • Device file list
    • Retry/Priority Download
    • Redownload (downloaded file)
    • Conversation list
    • Close session
    • Recording plan log-device
    • Recording plan log-plan
  • 28181out
    • Add parent platform
    • Get superior platform information
    • Modify upper-level platform
    • Delete parent platform
    • push directory
    • Get upper-level platform list
    • Get status
    • Get device group list
    • Add device group
    • Modify device group
    • Delete device group
    • Get device group
    • Get 28181 device list
    • Added 28181 devices
    • Modify 28181 device
    • Delete 28181 device
    • Get 28181 device by puid
    • Get 28181 device by 28181 id
    • Add channel information
    • Modify channel information
    • Delete channel information
    • Get channel information
    • Get 28181 channel list
    • Add upper-level platform
    • Delete upper-level platform device
    • Get upper-level platform devices
  • 28181in
    • Added 28181 devices
    • Modify 28181 device
    • Delete 28181 device
    • Get 28181 device information
    • Get 28181 device list
    • Add 28181 platform
    • Modify 28181 platform
    • Delete 28181 platform
    • Get 28181 platform information
    • Get 28181 platform list
    • Get configuration information
    • Create video file download task
    • Get video file list
    • Get video file download progress
    • Video file download

Platform access

Platform access control Provides terminals with access and control of platform resources.

Authentication

User login

Basic Information

Path: /bvcsp/v1/auth/login

Method: POST

Interface description:

If the client is not authenticated or the authentication has expired, when the client sends an HTTP request to operate a certain resource, the server will return a failure to the request with code==9. In this case, you need to use this interface for authentication.

After the interface returns 200 success, the authentication is successful. When sending other requests later, you need to put the data.token string in the Authorization of the request header (or key="Authorization" in the cookie).

The interface does not guarantee data security and relies on SSL to ensure data security. It is recommended to use HTTPS to access this interface.

After a Token is created, it remains valid until it expires.

passwordEncryption rules: 1. First, obtain the encryption algorithm through the "Get User Information Requirements" interface, for example: SHA256. 2. After encryption, the password = SHA256: ciphertext. Ciphertext=SHA256(id_password), which means "account_password" is combined and encrypted by algorithm.
For example: account "admin", password "123456", the encrypted password is: "SHA256:6848d6405bf34bf9b2d82ed8822c756807632d3eaefedec90ac33cb32ac83671"
Note: The passwords stored in the database are encrypted in the background.

enum ErrorCode {
    SUCCESS = 0; // Success
    FAIL = 1; // General failure
    NotFound = 2; // Object not found
    Exist = 3; // The target already exists
    ErrorParam = 4; // There is an error in the parameter
    Offline = 5; // The target is not online
    Timeout = 6; // Request timeout
    Busy = 7; // The target is busy
    Unsupported = 8; // Unsupported request
    AutherFail = 9; // Authentication failed
    Forbidden = 10; //Reject the request, the server is busy
    ServerError = 11; // There is a problem with the server
    VTDUNone = 12; // No VTDU available
    NRUNone = 13; // No NRU available
    ErrorPassword = 14; //Wrong account password
    ErrorDatabase = 15; // Database error
    NoPermission = 16 // No permission
    MaxRetries = 17 // Maximum number of retries reached
    MaxLimit = 18 // Maximum resource limit reached
}

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

Body

name type Is must default value Remark other information
username string Must Username, ASCII character set characters only

mock: admin

password_encrypted string Must Encrypted password
timestamp number Must Timestamp, seconds

Return data

name type Is must default value Remark other information
msg string Must Result description

mock: "Successful operation"

code number Must error code

mock: 0

data object not necessary Obtained token information
├─ token string not necessary access token

mock: 7jrcjmna8qnqg8d3dgnzs87m4v2dme3l

├─ timeout number not necessary Token validity period in seconds

mock: 86400

├─ appID number not necessary Login instance ID

mock: 1

├─ change_password boolean not necessary Do you need to change your password?
├─ remaining number not necessary It is valid when the code is 14, and the number of retries is remaining.

mock: 0

├─ locking number not necessary It is valid when the code is 17, and the remaining account lock time is seconds.

mock: 0

logout

Basic Information

Path: /bvcsp/v1/auth/logout

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/x-www-form-urlencoded yes
Authorization yes The token returned by the login interface

Return data

name type Is must default value Remark other information
code number Must Result error code

mock: 0

msg string Must Result description

mock: OK

Refresh token

Basic Information

Path: /bvcsp/v1/auth/refresh

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/x-www-form-urlencoded yes
Authorization yes The token returned by the login interface

Return data

name type Is must default value Remark other information
code number Must Result error code

mock: 0

msg string Must Result description

mock: OK

data object Must Token returned successfully
├─ token string Must new token
├─ timeout number Must token timeout length, seconds

mock: 4800

├─ appID number Must Login instance ID

mock: 0

Get logged information

Basic Information

Path: /bvcsp/v1/auth/userinfo

Method: GET

Interface description:

By obtaining the currently logged-in user information interface, the user's permission set can be obtained, and the management interface can be displayed based on the permissions.
Permission value description: 0: No permission; 1: Yes.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/x-www-form-urlencoded yes
Authorization yes The token returned by the login interface
Cookies yes Authorization is token, the same as header

Return data

name type Is must default value Remark other information
code number Must Result error code

mock: 0

msg string Must Result description

mock: OK

data object Must Login user information
├─ ID string Must user account

mock: admin

├─ name string Must username

mock: administrator

├─ idcard string not necessary ID number
├─ gid string Must User group ID to which it belongs

mock: 000000

├─ loginTime number Must Log in time

mock: @timestamp

├─ addr string not necessary Online address

mock: 192.168.6.63:554

├─ appID number not necessary Login instance ID
├─ roles string[] not necessary role list

item type: string

├─ not necessary Role ID
├─ permissions object[] not necessary User rights

item type: object

├─ ID string Must Permission ID

enumerate: superAdmin,userManager,userGroupManager,deviceManager,deviceGroupManager,roleManager,IMGroupManager,NRU,VTDU,alarm,region

Enumeration notes: super administrator privileges User management rights User group permissions Device management permissions Device group management permissions Role management permissions Group chat management permissions Storage service management permissions Streaming service management permissions Alarm linkage management permissions Electronic fence and line planning authority

├─ level number Must Permission level, 0: no permission

mock: 0

Modify own password

Basic Information

Path: /bvcsp/v1/auth/password

Method: POST

Interface description:

Password encryption rules: 1. First obtain the encryption algorithm through the "Get User Information Requirements" interface, for example: SHA256. 2. After encryption, the password = SHA256: ciphertext. Ciphertext=SHA256(id_password), which means "account_password" is combined and encrypted by algorithm.
For example: account "admin", password "123456", the encrypted password is: "SHA256:6848d6405bf34bf9b2d82ed8822c756807632d3eaefedec90ac33cb32ac83671"
Note: The passwords stored in the database are encrypted in the background.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes The token returned by the login interface

Body

name type Is must default value Remark other information
old_password_encrypted string Must Original password (encrypted)
new_password_encrypted string Must New password (encrypted)

Return data

name type Is must default value Remark other information
code number Must Result error code
msg string Must Result description

Get device login QR code

Basic Information

Path: /bvcsp/v1/auth/qrcode

Method: POST

Interface description:

QR code data format:

{
  "loginInfo": {
    "szServerAddr": "115.28.79.237",
    "iServerPort": 9701,
    "szUserName": "test",
    "password_encrypted":"224d5ee0c6a07e17cd4c7a1d21b3b2bb22c208f17c9"
  }
}

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes The token returned by the login interface

Body

name type Is must default value Remark other information
user_id string not necessary user account
device_id string not necessary Device ID. Empty: No restriction on login device ID
begin_time integer not necessary Effective time, 0: effective immediately
end_time integer not necessary Expiration time, 0:1 minute

Return data

name type Is must default value Remark other information
code number Must Result error code
msg string Must Result description
data object not necessary
├─ begin_time integer not necessary Effective time
├─ end_time integer not necessary Expiration time
├─ server_addr string[] Must server address

item type: string

├─ not necessary tcp://ip:port or udp://ip:port
├─ password_encrypted string not necessary QR code key

user

Get root user group information

Basic Information

Path: /bvcsp/v1/usergroup/root

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must Group ID

mock: 000000

├─ name string Must Department name

mock: root node

├─ abbreviation string not necessary Department abbreviation

mock: root node

├─ desc string not necessary describe

mock: root node

Get user group information

Basic Information

Path: /bvcsp/v1/usergroup/info/:groupid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must Group ID

mock: 000000

├─ pid string Must Parent group ID

mock: 000000

├─ name string Must Department name

mock: root node

├─ abbreviation string not necessary Department abbreviation

mock: root node

├─ desc string not necessary describe

mock: root node

Get list of user groups

Basic Information

Path: /bvcsp/v1/usergroup/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy match user group name

mock: root node

├─ pid string not necessary Parent group ID

mock: 000000

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ ID string Must User group ID

mock: 000000

├─ pid string Must Superior user group ID

mock: 000000

├─ name string Must Name (full name of department, may be very long)
├─ abbreviation string not necessary abbreviation

Get user list

Basic Information

Path: /bvcsp/v1/user/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

order string not necessary Sorting. For example: +id (ID ascending order), -id (ID descending order), +key (unique sorting)
filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching user account/user name

mock: admin

├─ gid string not necessary User group ID to which it belongs

mock: 000000

├─ status number not necessary 0: All; 1: Online; 2: Not online

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary user list

item type: object

├─ ID string Must user account

mock: admin

├─ gid string Must User group ID to which it belongs

mock: 000000

├─ name string Must username
├─ position string not necessary User title

mock: administrator

├─ enable boolean not necessary Is enable
├─ status number not necessary Online status: 0: Not online; 1: Online.

mock: 0

Get a list of online users

Basic Information

Path: /bvcsp/v1/user/online_list

Method: POST

Interface description:

Filter by device 0: all, 1: with device capability, 2: without device capability to filter whether the user logs in through the device.
When the deviceID and channels of the reply are not empty, it means it is a device and the channel corresponding to the deviceID can be operated.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching user account/user name

mock: admin

├─ ID string not necessary User ID

mock: admin

├─ gid string not necessary User group ID to which it belongs

mock: 000000

├─ device number not necessary 0: All, 1: With device capability, 2: No device capability

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User device list

item type: object

├─ ID string Must User ID

mock: admin

├─ gid string Must Group ID

mock: 000000

├─ name string Must user name

mock: test

├─ deviceID string not necessary Device ID
├─ deviceName string not necessary Device Name
├─ classID number not necessary Equipment class
├─ className string not necessary Category Name
├─ channels object[] not necessary Channel list

item type: object

├─ index number Must Channel number

mock: 0

├─ mediaDir number Must Supported media directions (from the requester's perspective)

enumerate: 1,2,4,8,16,32

Enumeration notes: videoSend, videoRecv, audioSend, audioRecv, dataSend, dataRecv

mock: 10

├─ ptz number not necessary The PTZ index of the channel. -1 means no gimbal

mock: 0

├─ name string not necessary Channel name

mock: Front door

├─ gps object not necessary The location reported or set
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

├─ time number Must

Get user online status

Basic Information

Path: /bvcsp/v1/user/status/:userid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
userid admin user account

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must User Info
├─ ID string Must user account

mock: admin

├─ status number Must 0: Not online, 1: Online

mock: 0

├─ sessions object[] not necessary Online instance list

item type: object

├─ appID number Must Login ID

mock: 1

├─ addr string Must Online address

mock: 192.168.6.63:554

├─ protocol string Must Online agreement

mock: http

├─ time number Must time online

mock: @timestamp

├─ deviceID string not necessary Terminal hardware ID number (may be empty)

mock: UA_000000

Get the user's current location

Basic Information

Path: /bvcsp/v1/user/gpsdata/:userid

Method: GET

Interface description:

The user may log in multiple times, and the GPS of multiple terminals will be returned.

Signal source:

value Signal source
1 US GPS
2 China Beidou
4 GLONASS, RUSSIA
8 European Galileo
16 Japanese quasi-zenith
32 uwb positioning
64 Base station positioning
128 Bluetooth positioning

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
userid user id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] Must

item type: object

├─ deviceID string Must device id
├─ gps object Must Location
├─ lng number Must Longitude (WGS84)

mock: 31.52

├─ lat number Must Dimensions (WGS84)

mock: 31.52

├─ time number Must Positioning time (UTC)

mock: @timestamp

├─ height number Must Height, unit 1/100 meter

mock: 0

├─ angle number Must Direction angle (north is the origin, clockwise is positive), unit 1/1000 degree

mock: 0

├─ speed number Must Speed(m/h)

mock: 0

├─ starCount number Must Number of positioning stars, if <= 0, it is not satellite positioning.

mock: 4

├─ state number Must Positioning status (1-positioned, 0-not positioned)

mock: 1

├─ satellite number Must Signal source

mock: 2

Get user information

Basic Information

Path: /bvcsp/v1/user/info/:userid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
userid admin user account

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary User Info
├─ ID string Must user account

mock: admin

├─ enable boolean not necessary Is enable
├─ gid string Must Group ID

mock: 000000

├─ name string Must username

mock: admin

├─ idcard string not necessary ID number
├─ creator string Must Creator account

mock: admin

├─ validity_time number not necessary Validity expiration date
├─ position string not necessary User's job title

mock: System administrator

├─ phone string not necessary telephone number

mock: 12345678910

├─ email string not necessary Mail

mock: xxx@000.com

├─ desc string not necessary describe
├─ roles string[] not necessary List of bound roles

item type: string

├─ not necessary Role ID
├─ password_time number not necessary Password last modified time

Role

Get role list

Basic Information

Path: /bvcsp/v1/role/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy match role name

mock: admin

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary user list

item type: object

├─ ID string Must Role ID

mock: 000000

├─ name string Must Role Name

mock: administrator

Get role information

Basic Information

Path: /bvcsp/v1/role/info/:roleid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
roleid Role ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary role information
├─ ID string Must Role ID

mock: admin

├─ name string Must Role Name

mock: admin

├─ creator string Must Creator account

mock: admin

├─ permissions object[] not necessary Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: superAdmin,userManager,userGroupManager,deviceManager,deviceGroupManager,roleManager,IMGroupManager,NRU,VTDU,alarm,region

Enumeration notes: super administrator privileges User management rights User group permissions Device management permissions Device group management permissions Role management permissions Group chat management permissions Storage service management permissions Streaming service management permissions Alarm linkage management permissions Electronic fence and line planning authority

├─ level number not necessary Permission level, 0: no permission

mock: 0

Creating a Role

Basic Information

Path: /bvcsp/v1/role/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
name string Must username

mock: admin

permissions object[] Must Permission list

item type: object

├─ ID string Must Permission ID

enumerate: superAdmin,userManager,userGroupManager,deviceManager,deviceGroupManager,roleManager,IMGroupManager,NRU,VTDU,alarm,region

Enumeration notes: super administrator privileges User management rights User group permissions Device management permissions Device group management permissions Role management permissions Group chat management permissions Storage service management permissions Streaming service management permissions Alarm linkage management permissions Electronic fence and line planning authority

├─ level number Must Permission level, 0: no permission

mock: 0

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must role information
├─ ID string Must Role ID

mock: admin

├─ name string Must Role Name

mock: admin

├─ creator string Must Creator account

mock: admin

├─ permissions object[] Must Permission list

item type: object

├─ ID string Must Permission ID

enumerate: superAdmin,userManager,userGroupManager,deviceManager,deviceGroupManager,roleManager,IMGroupManager,NRU,VTDU,alarm,region

Enumeration notes: super administrator privileges User management rights User group permissions Device management permissions Device group management permissions Role management permissions Group chat management permissions Storage service management permissions Streaming service management permissions Alarm linkage management permissions Electronic fence and line planning authority

├─ level number Must Permission level, 0: no permission

mock: 0

Modify role

Basic Information

Path: /bvcsp/v1/role/:roleid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
roleid Role ID

Body

name type Is must default value Remark other information
name string Must username

mock: admin

permissions object[] Must Permission list

item type: object

├─ ID string Must Permission ID

enumerate: superAdmin,userManager,userGroupManager,deviceManager,deviceGroupManager,roleManager,IMGroupManager,NRU,VTDU,alarm,region

Enumeration notes: super administrator privileges User management rights User group permissions Device management permissions Device group management permissions Role management permissions Group chat management permissions Storage service management permissions Streaming service management permissions Alarm linkage management permissions Electronic fence and line planning authority

├─ level number Must Permission level, 0: no permission

mock: 0

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must role information
├─ ID string Must Role ID

mock: admin

├─ name string Must Role Name

mock: admin

├─ creator string Must Creator account

mock: admin

├─ permissions object[] Must Permission list

item type: object

├─ ID string Must Permission ID

enumerate: superAdmin,userManager,userGroupManager,deviceManager,deviceGroupManager,roleManager,IMGroupManager,NRU,VTDU,alarm,region

Enumeration notes: super administrator privileges User management rights User group permissions Device management permissions Device group management permissions Role management permissions Group chat management permissions Storage service management permissions Streaming service management permissions Alarm linkage management permissions Electronic fence and line planning authority

├─ level number Must Permission level, 0: no permission

mock: 0

Delete role

Basic Information

Path: /bvcsp/v1/role/:roleid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
roleid Role ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get the role resource list

Basic Information

Path: /bvcsp/v1/role/resource/:roleid

Method: GET

Interface description:

Roles can have: Equipment group types,User group type, role types and other resources, used to allocate rights objects to multiple users in batches.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
roleid Role ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary User resource list

item type: object

├─ ID number Must resource id

mock: 0

├─ objtype number Must Resource object type

enumerate: 1,2,3

Enumeration notes: Device group type, user group type, role type

mock: 1

├─ objid string Must Resource object ID

mock: 000000

Add role resources

Basic Information

Path: /bvcsp/v1/role/resource/add/:roleid

Method: POST

Interface description:

Roles can have resources such as device group types, user group types, and role types, which are used to assign rights objects to multiple users in batches.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
roleid Role ID

Body

name type Is must default value Remark other information
resources object[] not necessary Add resources

item type: object

├─ objtype number Must Resource object type

enumerate: 1,2,3

Enumeration notes: Device group type, user group type, role type

mock: 1

├─ objid string Must Resource object ID

mock: 000000

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] Must Added resource successfully

item type: object

├─ ID number not necessary resource id

mock: 0

├─ objtype number not necessary Resource object type

enumerate: 1,2,3

Enumeration notes: Device group type, user group type, role type

mock: 1

├─ objid string not necessary Resource object ID

mock: 000000

Delete role resources

Basic Information

Path: /bvcsp/v1/role/resource/del/:roleid

Method: POST

Interface description:

Roles can have resources such as device group types, user group types, and role types, which are used to assign rights objects to multiple users in batches.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
roleid Role ID

Body

name type Is must default value Remark other information
resources object[] not necessary Delete resources

item type: object

├─ ID number Must resource id

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

User Management

Create user group

Basic Information

Path: /bvcsp/v1/usergroup/create

Method: POST

Interface description:

The organization abbreviation is used when the name of the organization is very long. The abbreviation (if any) can be displayed in the interface list.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
pid string Must Parent group ID

mock: 000000

name string Must name of association

mock: xxx Technology Co., Ltd. Platform Group

abbreviation string not necessary Organization abbreviation

mock: platform group

desc string not necessary Description of the organization

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must Group ID

mock: 000000

├─ pid string Must Group ID

mock: 000000

├─ name string Must Department name

mock: root node

├─ abbreviation string not necessary Department abbreviation

mock: root node

├─ desc string not necessary describe

mock: root node

Modify user group

Basic Information

Path: /bvcsp/v1/usergroup/:gid

Method: PUT

Interface description:

The organization abbreviation is used when the name of the organization is very long. The abbreviation (if any) can be displayed in the interface list.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
gid 0000000 User group ID

Body

name type Is must default value Remark other information
name string Must name of association

mock: xxx Technology Co., Ltd. Platform Group

abbreviation string not necessary Organization abbreviation

mock: platform group

desc string not necessary Description of the organization

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must Group ID

mock: 000000

├─ pid string Must Group ID

mock: 000000

├─ name string Must Department name

mock: root node

├─ abbreviation string not necessary Department abbreviation

mock: root node

├─ desc string not necessary describe

mock: root node

Delete user group

Basic Information

Path: /bvcsp/v1/usergroup/:gid

Method: DELETE

Interface description:

When deleting a user group, the users under the group will be deleted.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
gid 000000 User group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Obtain user information requirements

Basic Information

Path: /bvcsp/v1/user/requirement

Method: GET

Interface description:

Enable real-name system:
    a. User name and ID number are not allowed to be empty.
    b. Illegal and duplicate ID numbers are not allowed.

Enable password complexity:
    a. Accounts are not allowed.
    b. At least 8 characters, which should be a combination of three or more types of uppercase letters, lowercase letters, numbers, and special characters.

Reminder to change password period, unit: days;
    a, 0: Do not remind.
    b. After enabling, no matter how many days the cycle is, new users and users whose passwords are changed by the administrator will be reminded to change their passwords when they log in for the first time.

Password encryption algorithm currently supports: SHA256

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

Return data

name type Is must default value Remark other information
code number Must Operation result

mock: 0

msg string Must Result description

mock: OK

data object not necessary User information request
├─ real_name boolean not necessary Whether to enable real-name system
├─ complex_password boolean not necessary Whether to enable complex passwords
├─ password_cycle number not necessary Reminder to change password period, unit: days; 0: no reminder.
├─ password_alg string not necessary Password encryption algorithm

Check create request is available

Basic Information

Path: /bvcsp/v1/user/newusercheck

Method: POST

Interface description:

It is mainly used to check whether the format of the user account that needs to be created is correct, whether the account already exists, whether the group it belongs to exists, and whether there is permission to operate.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string not necessary user account

mock: xxx

gid string Must User group ID

mock: xxx

Return data

name type Is must default value Remark other information
code number Must Operation result

Maximum value: 5

Minimum value: 0

enumerate: 0,1,2,3,4

Enumeration notes: 0: Success 1: id already exists 2: The id is illegal 3: gid does not exist 4: No permission

mock: 0

msg string Must Result description

mock: OK

Create user

Basic Information

Path: /bvcsp/v1/user/create

Method: POST

Interface description:

User account: The IDs of all resources are only allowed to be ASCII characters, and can only be letters, numbers, _, and -. The length is between [3,30]. The regular expression is ^[0-9a-zA-Z__-]{3,30}$

password_encrypted: encrypted password;
passwordEncryption rules: 1. First, obtain the encryption algorithm through the "Get User Information Requirements" interface, for example: SHA256. 2. After encryption, the password = SHA256: ciphertext. Ciphertext=SHA256(id_password), which means "account_password" is combined and encrypted by algorithm.
For example: account "admin", password "123456", the encrypted password is: "SHA256:6848d6405bf34bf9b2d82ed8822c756807632d3eaefedec90ac33cb32ac83671"
Note: The passwords stored in the database are encrypted in the background.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must user account

mock: admin

gid string Must Group ID

mock: 000000

name string Must username

mock: admin

idcard string not necessary ID number
validity_time number not necessary Validity expiration date
password_encrypted string Must Encrypted login password
position string not necessary User's job title

mock: System administrator

phone string not necessary telephone number

mock: 12345678910

email string not necessary Mail

mock: xxx@000.com

desc string not necessary describe
roles string[] not necessary List of bound roles

item type: string

├─ not necessary Role ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must user account

mock: admin

├─ gid string Must Group ID

mock: 000000

├─ name string Must username

mock: admin

├─ idcard string not necessary ID number
├─ validity_time number not necessary Validity expiration date
├─ allocate string Must Creator account

mock: admin

├─ position string not necessary User's job title

mock: System administrator

├─ phone string not necessary telephone number

mock: 12345678910

├─ email string not necessary Mail

mock: xxx@000.com

├─ desc string not necessary describe
├─ roles string[] not necessary List of bound roles

item type: string

├─ not necessary Role ID

Modify user

Basic Information

Path: /bvcsp/v1/user/:userid

Method: PUT

Interface description:

ID number: When the ID number in the database is not empty, the ID number remains unchanged.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
userid admin user account

Body

name type Is must default value Remark other information
gid string Must Group ID

mock: 000000

enable boolean not necessary Is enable
name string Must username

mock: admin

idcard string not necessary ID number
validity_time number not necessary Validity expiration date
position string not necessary User's job title

mock: System administrator

phone string not necessary telephone number

mock: 12345678910

email string not necessary Mail

mock: xxx@000.com

desc string not necessary describe
roles string[] not necessary List of bound roles

item type: string

├─ not necessary Role ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must user account

mock: admin

├─ gid string Must Group ID

mock: 000000

├─ enable boolean not necessary Is enable
├─ name string Must username

mock: admin

├─ idcard string not necessary ID number
├─ validity_time number not necessary Validity expiration date
├─ allocate string Must Creator account

mock: admin

├─ position string not necessary User's job title

mock: System administrator

├─ phone string not necessary telephone number

mock: 12345678910

├─ email string not necessary Mail

mock: xxx@000.com

├─ desc string not necessary describe
├─ roles string[] not necessary List of bound roles

item type: string

├─ not necessary Role ID

delete users

Basic Information

Path: /bvcsp/v1/user/:userid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
userid admin user account

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Change user password

Basic Information

Path: /bvcsp/v1/user/password/:userid

Method: POST

Interface description:

It is used by administrators to change the passwords of other users. This request cannot be used to change their own passwords.

passwordEncryption rules: 1. First, obtain the encryption algorithm through the "Get User Information Requirements" interface, for example: SHA256. 2. After encryption, the password = SHA256: ciphertext. Ciphertext=SHA256(id_password), which means "account_password" is combined and encrypted by algorithm.
For example: account "admin", password "123456", the encrypted password is: "SHA256:6848d6405bf34bf9b2d82ed8822c756807632d3eaefedec90ac33cb32ac83671"
Note: The passwords stored in the database are encrypted in the background.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
userid admin user account

Body

name type Is must default value Remark other information
password_encrypted string Must Current login user password (encrypted)
new_password_encrypted string Must New password (after encryption)

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Kick user offline

Basic Information

Path: /bvcsp/v1/user/kickout

Method: POST

Interface description:

Used to kick online users offline. The current user needs to have user management rights.
The appID can be obtained through the user online status interface. 0 means that all online instances with userid are kicked offline.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must user account user account

mock: admin

appID number not necessary Login ID Login ID. 0 means all login instances with userid

mock: 1

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get user resource list

Basic Information

Path: /bvcsp/v1/user/resource/:userid

Method: GET

Interface description:

Can be independently owned under the user account name: device group type,User group type, role types and other resources, used to expand the scope of user rights objects.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
userid admin user account

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary User resource list

item type: object

├─ ID number Must resource id

mock: 0

├─ objType number Must Resource object type

enumerate: 1,2,3

Enumeration notes: Device group type, user group type, role type

mock: 1

├─ objID string Must Resource object ID

mock: 000000

Add user resources

Basic Information

Path: /bvcsp/v1/user/resource/add/:userid

Method: POST

Interface description:

Can be independently owned under the user account name: device group type,User group type, role types and other resources, used to expand the scope of user rights objects.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
userid admin user account

Body

name type Is must default value Remark other information
resources object[] not necessary Add resources

item type: object

├─ objType number Must Resource object type

enumerate: 1,2,3

Enumeration notes: Device group type, user group type, role type

mock: 1

├─ objID string Must Resource object ID

mock: 000000

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] Must Added resource successfully

item type: object

├─ ID number not necessary resource id

mock: 0

├─ objType number not necessary Resource object type

enumerate: 1,2,3

Enumeration notes: Device group type, user group type, role type

mock: 1

├─ objID string not necessary Resource object ID

mock: 000000

Delete user resources

Basic Information

Path: /bvcsp/v1/user/resource/del/:userid

Method: POST

Interface description:

Can be independently owned under the user account name: device group type,User group type, role types and other resources, used to expand the scope of user rights objects.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
userid

Body

name type Is must default value Remark other information
resources object[] not necessary Delete resources

item type: object

├─ ID number Must resource id

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Device

Get root device group information

Basic Information

Path: /bvcsp/v1/pugroup/root

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must Group ID

mock: 000000

├─ name string Must name

mock: root node

├─ desc string not necessary describe

mock: root node

Get list of device groups

Basic Information

Path: /bvcsp/v1/pugroup/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching device group name

mock: root node

├─ pid string not necessary Parent group ID

mock: 000000

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary group list

item type: object

├─ ID string Must Group ID

mock: 000000

├─ pid string Must Parent group ID

mock: 000000

├─ name string Must name

Get device group information

Basic Information

Path: /bvcsp/v1/pugroup/info/:groupid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 000000 Group ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must Group ID

mock: 000000

├─ pid string Must Parent group ID

mock: 000000

├─ name string Must name

mock: root node

├─ desc string not necessary describe

mock: root node

Get device class list

Basic Information

Path: /bvcsp/v1/pu/puclass/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy match name

mock: test

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary Device List

item type: object

├─ ID number Must Class ID

mock: 1

├─ name string Must name

mock: test

Get device class information

Basic Information

Path: /bvcsp/v1/pu/puclass/:id

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Class ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID number Must ID
├─ name string Must name

mock: root node

Get device list

Basic Information

Path: /bvcsp/v1/pu/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

order string not necessary Sorting. For example: +id (ID ascending order), -id (ID descending order), +key (unique sorting)

mock: @string

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching device ID/device name

mock: test

├─ gid string not necessary Group ID

mock: 000000

├─ status number not necessary 0: All; 1: Online; 2: Not online; 3: Online user terminal

mock: 0

├─ classIds number [] not necessary Device Class collection, empty does not filter

item type: number

├─ not necessary

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary Device List

item type: object

├─ ID string Must Device ID

mock: PU_0

├─ gid string Must Group ID

mock: 000000

├─ name string Must Device Name

mock: test

├─ status number not necessary Online status: 0: Not online; 1: Online.

mock: 0

├─ classID number not necessary Equipment class
├─ userName string not necessary Login user name
├─ className string not necessary Category Name
├─ channels object[] not necessary Channel list

item type: object

├─ index number Must Channel number

mock: 0

├─ mediaDir number Must Supported media directions (from the requester's perspective)

enumerate: 1,2,4,8,16,32

Enumeration notes: videoSend, videoRecv, audioSend, audioRecv, dataSend, dataRecv

mock: 10

├─ ptz number Must The PTZ index of the channel. -1 means no gimbal

mock: 0

├─ name string Must Channel name

mock: Front door

├─ gps object not necessary The location reported or set
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

├─ time number Must

Get device information

Basic Information

Path: /bvcsp/v1/pu/info/:puid

Method: GET

Interface description:

channels.index (channel number) value description:
[0, 65535] is the audio and video channel;
[65536,65791] GPS Channel;
[65792, 66047] is the serial port channel;
66048 is the remote playback channel;
66064 is the file transfer channel.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid PU_0 Device ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Device Information
├─ ID string Must Device ID

mock: PU_0

├─ gid string Must Group ID

mock: 000000

├─ name string Must Device Name

mock: test

├─ manufacturer string not necessary Manufacturer's name

mock: bv

├─ product string not necessary product name

mock: mpu

├─ softwareVersion string not necessary Software version

mock: 0.0.0

├─ hardwareVersion string not necessary hardware version
├─ classID number not necessary Equipment class
├─ className string not necessary Category Name
├─ channels object[] Must Channel list

item type: object

├─ index number Must Channel number

mock: 0

├─ mediaDir number Must Supported media directions (from the requester's perspective)

enumerate: 1,2,4,8,16,32

Enumeration notes: videoSend, videoRecv, audioSend, audioRecv, dataSend, dataRecv

mock: 10

├─ ptz number Must The PTZ index of the channel. -1 means no gimbal

mock: 0

├─ name string Must Channel name

mock: Front door

├─ gps object not necessary The location reported or set
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

├─ time number not necessary
├─ hardware object Must hardware information
├─ WIFI number Must Number of WIFIs

mock: 1

├─ radio number Must Number of wireless modules

mock: 1

├─ videoIn number Must Number of video inputs

mock: 1

├─ audioIn number Must Number of audio inputs

mock: 1

├─ audioOut number Must Number of audio outputs

mock: 1

├─ PTZ number Must PTZ Count

mock: 1

├─ serialPort number Must Number of serial ports

mock: 1

├─ alertIn number Must Number of alarm inputs

mock: 1

├─ alertOut number Must Number of alarm outputs

mock: 1

├─ storage number Must Number of storage devices

mock: 1

├─ GPS number Must Number of GPS devices

mock: 1

Get device online status

Basic Information

Path: /bvcsp/v1/pu/status/:puid

Method: GET

Interface description:

network: 1-unknow 2-ethernet 3-wifi 4-cellular

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid 0000000 Device ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must Device Information
├─ ID string Must Device ID

mock: PU_2079842A

├─ status number Must 0: Not online, 1: Online

mock: 0

├─ network number not necessary Online network method

enumerate: 1,2,4,8

Enumeration notes: Don't know, Ethernet, WIFI, cellular network

mock: 0

├─ onlineTime number not necessary time online

mock: @timestamp

├─ bootTime number not necessary boot time

mock: @timestamp

├─ addr string not necessary Terminal address

mock: 127.0.0.1:554

├─ protocol string not necessary Network protocol

mock: sip

├─ userid string not necessary If it is a UA device, user id
├─ userName string not necessary If it is a UA device, user name
├─ gps object not necessary The location reported or set
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

├─ time number not necessary UTC

Get device location

Basic Information

Path: /bvcsp/v1/pu/gpsdata/:puid

Method: GET

Interface description:

Signal source:

value Signal source
1 US GPS
2 China Beidou
4 GLONASS, RUSSIA
8 European Galileo
16 Japanese quasi-zenith
32 uwb positioning
64 Base station positioning
128 Bluetooth positioning

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid PU_0 Device ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must Location
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

├─ time number Must Positioning time (UTC)

mock: @timestamp

├─ height number Must Height, unit 1/100 meter

mock: 0

├─ angle number Must Direction angle (north is the origin, clockwise is positive), unit 1/1000 degree

mock: 0

├─ speed number Must Speed(m/h)

mock: 0

├─ starCount number Must Number of positioning stars, if <= 0, it is not satellite positioning.

mock: 4

├─ state number Must Positioning status (1-positioned, 0-not positioned)

mock: 1

├─ satellite number Must Signal source

mock: 2

Get battery information

Basic Information

Path: /bvcsp/v1/pu/power/battery/:puid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must battery information
├─ batteryPower number Must Current battery capacity, unit 1/1000 percentage. For example: iBatteryPower=100*1000 when the battery is 100%. read only
├─ batteryStatus number Must The current status of the battery, 0: discharge 1: charge. read only
├─ bLowPowerAlarm number not necessary Whether to enable low battery alarm. 0-no alarm, 1-alarm
├─ iMinPowerAlarm number not necessary Low battery alarm threshold. Unit 1/1000%

Transparent command

Basic Information

Path: /bvcsp/v1/pu/custom/:puid/:index

Method: POST

Interface description:

Transparent transmission command, transparently transmit index (range 1~15) and payload (string utf-8) to the device,
If successful, the payload (string utf-8) replied by the device will be returned unchanged. It is recommended to use json format for the payload.
Used to communicate with customized equipment for special projects to achieve customized command communication.
The current path also supports the GET method.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID number
index Command index[1,15]

Body

text

Manual recording-start

Basic Information

Path: /bvcsp/v1/pu/manualrecord/start/:puid/:index

Method: POST

Interface description:

Recording end time, the recording will automatically end when the time is up (timestamp, unit second, such as: 1649752074) (0: The recording will never end, and the recording state needs to be ended manually)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

path parameters

parameter name Example Remark
puid Device ID number
index Channel number

Body

name type Is must default value Remark other information
video boolean Must Whether to record video

mock: @boolean

audio boolean Must Whether to record audio

mock: @boolean

stopTime integer Must Recording end time, the recording will automatically end when the time is up (timestamp, unit second, such as: 1649752074) (0: the recording will never end, Need to manually end the recording state)

mock: @timestamp

fileName string Must Video file name

Return data

name type Is must default value Remark other information
code integer Must
msg string Must

Capture a picture manually

Basic Information

Path: /bvcsp/v1/pu/manualsnapshot/one/:puid/:index

Method: POST

Interface description:

Manually capture a picture and upload it to the platform.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

path parameters

parameter name Example Remark
puid Device ID number
index Channel number

Return data

name type Is must default value Remark other information
code integer Must
msg string Must
data object not necessary File information
├─ fileID string Must Platform file ID
├─ channelIndex number not necessary Source channel number
├─ filePath string not necessary Store full path
├─ fileSize number not necessary File size (unit byte)
├─ fileName string not necessary File Name

Manual recording-stop

Basic Information

Path: /bvcsp/v1/pu/manualrecord/stop/:puid/:index

Method: POST

Interface description:

Manually end recording status

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

path parameters

parameter name Example Remark
puid Device ID number
index Channel number

Return data

name type Is must default value Remark other information
code integer Must
msg string Must

Device management

Create device group

Basic Information

Path: /bvcsp/v1/pugroup/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
pid string Must Parent group ID

mock: 000000

name string Must name of association

mock: xxx Technology Co., Ltd. Platform Group

desc string not necessary Description of the organization

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must Group ID

mock: 000000

├─ pid string Must Group ID

mock: 000000

├─ name string Must Department name

mock: root node

├─ desc string not necessary describe

mock: root node

Get common configuration

Basic Information

Path: /bvcsp/v1/pu/config/:puid

Method: GET

Interface description:

Parameters

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ jsonSchema string Must Configuration item model, read-only. See: https://json-schema.apifox.cn Online tool: https://app.quicktype.io/#l=schema
├─ jsonConfig string Must Current configuration, writable. json string

Set common configuration

Basic Information

Path: /bvcsp/v1/pu/config/:puid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
jsonConfig string Must Current configuration, writable. json string

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Modify device group

Basic Information

Path: /bvcsp/v1/pugroup/:gid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
gid 000000 Group ID

Body

name type Is must default value Remark other information
name string Must name of association

mock: xxx Technology Co., Ltd. Platform Group

desc string not necessary Description of the organization

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must Group ID

mock: 000000

├─ pid string Must Group ID

mock: 000000

├─ name string Must Department name

mock: root node

├─ desc string not necessary describe

mock: root node

Delete device group

Basic Information

Path: /bvcsp/v1/pugroup/:gid

Method: DELETE

Interface description:

When deleting a device group, the devices under the group will be deleted.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
gid 0000000 Group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify basic device information

Basic Information

Path: /bvcsp/v1/pu/info/:puid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid PU_0 Device ID

Body

name type Is must default value Remark other information
gid string not necessary Group ID

mock: 000000

name string not necessary Device Name

mock: test

classID number not necessary Equipment class
gps object not necessary Set device location
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify device channel information

Basic Information

Path: /bvcsp/v1/pu/channel/:puid/:index

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid PU_0 Device ID
index 0 Channel number

Body

name type Is must default value Remark other information
name string not necessary Channel name

mock: test

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Add device

Basic Information

Path: /bvcsp/v1/pu/add

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Device ID

mock: PU_0

gid string Must Group ID

mock: 000000

name string not necessary Device Name

mock: test

manufacturer string not necessary Manufacturer's name

mock: bv

product string not necessary product name

mock: mpu

softwareVersion string not necessary Software version

mock: 0.0.0

hardwareVersion string not necessary hardware version
classID number not necessary Equipment class
gps object not necessary The location reported or set
├─ lng number Must Longitude (WGS84), unit: degrees

mock: 31.52

├─ lat number Must Dimension (WGS84), unit: degrees

mock: 31.52

├─ time number not necessary
hardware object not necessary hardware information
├─ WIFI number not necessary Number of WIFIs

mock: 1

├─ radio number not necessary Number of wireless modules

mock: 1

├─ videoIn number not necessary Number of video inputs

mock: 1

├─ audioIn number not necessary Number of audio inputs

mock: 1

├─ audioOut number not necessary Number of audio outputs

mock: 1

├─ PTZ number not necessary PTZ Count

mock: 1

├─ serialPort number not necessary Number of serial ports

mock: 1

├─ alertIn number not necessary Number of alarm inputs

mock: 1

├─ alertOut number not necessary Number of alarm outputs

mock: 1

├─ storage number not necessary Number of storage devices

mock: 1

├─ GPS number not necessary Number of GPS devices

mock: 1

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Remove device

Basic Information

Path: /bvcsp/v1/pu/:puid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid PU_0 Device ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Reboot the device

Basic Information

Path: /bvcsp/v1/pu/reboot/:puid

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Create device class

Basic Information

Path: /bvcsp/v1/pu/puclass/create

Method: POST

Interface description:

Only accounts with super administrator rights can create device categories

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
name string Must name

mock: law enforcement instrument

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object not necessary Classified information
├─ ID number Must Class ID

mock: 1

├─ name string Must name

mock: root node

Modify device class

Basic Information

Path: /bvcsp/v1/pu/puclass/:id

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
ID Class ID

Body

name type Is must default value Remark other information
name string Must name

mock: helmet

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object not necessary group information
├─ ID number Must Class ID
├─ name string Must name

mock: root node

Delete Calss

Basic Information

Path: /bvcsp/v1/pu/puclass/:id

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
ID Class ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Kick online device offline

Basic Information

Path: /bvcsp/v1/pu/kickout/:puid

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid PU_0 Device ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Set power configuration

Basic Information

Path: /bvcsp/v1/pu/power/battery/:puid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid Device ID

Body

name type Is must default value Remark other information
bLowPowerAlarm number Must Whether to enable low battery alarm. 0-no alarm, 1-alarm
iMinPowerAlarm number Must Low battery alarm threshold. Unit 1/1000%

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get Ethernet configuration

Basic Information

Path: /bvcsp/v1/pu/network/ethernet/:puid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Device video source information
├─ dhcp number Must Whether to use DHCP. 0-not used; 1-used; -1-not supported by the device
├─ pppoe number Must Whether to use PPPoE. 0-not used; 1-used; -1-not supported by the device.
├─ autoDNS boolean Must Whether to automatically obtain DNS, only DHCP=1 or PPPoE=1 is meaningful.
├─ ip string not necessary IP address
├─ netMask string not necessary subnet mask
├─ gateway string not necessary Default gateway
├─ dns string[] not necessary domain name server

item type: string

├─ not necessary Domain name server address
├─ pppoeUserName string not necessary PPPoE username, only meaningful if bPPPoE=1
├─ pppoePassword string not necessary PPPoE password, only bPPPoE=1 is meaningful
├─ status number Must Current status: 0-Unknown 1-Connected normally 2-Network cable not plugged in 3-IP address abnormal

Set up Ethernet configuration

Basic Information

Path: /bvcsp/v1/pu/network/ethernet/:puid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid Device ID

Body

name type Is must default value Remark other information
dhcp number Must Whether to use DHCP. 0-not used; 1-used; -1-not supported by the device
pppoe number Must Whether to use PPPoE. 0-not used; 1-used; -1-not supported by the device.
autoDNS boolean Must Whether to automatically obtain DNS, only DHCP=1 or PPPoE=1 is meaningful.
ip string not necessary IP address
netMask string not necessary subnet mask
gateway string not necessary Default gateway
dns string[] not necessary domain name server

item type: string

├─ not necessary Domain name server address
pppoeUserName string not necessary PPPoE username, only meaningful if bPPPoE=1
pppoePassword string not necessary PPPoE password, only bPPPoE=1 is meaningful

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get Wifi configuration

Basic Information

Path: /bvcsp/v1/pu/network/wifi/:puid

Method: GET

Interface description:

// WifiSecurityType WIFI security type
type WifiSecurityType string

const (
   WifiSecurityTypeOpen WifiSecurityType = "open"
   WifiSecurityTypeShared WifiSecurityType = "shared"
   WifiSecurityTypeWPAPSK WifiSecurityType = "wpa_psk"
   WifiSecurityTypeWPA2PSK WifiSecurityType = "wpa2_psk"
)
// WifiCryptType WIFI encryption type
type WifiCryptType string

const (
   WifiCryptTypeNone WifiCryptType = "none"
   WifiCryptTypeWEP40 WifiCryptType = "wep40" // 64
   WifiCryptTypeWEP104 WifiCryptType = "wep104" // 128
   WifiCryptTypeTKIP WifiCryptType = "tkip"
   WifiCryptTypeAES WifiCryptType = "aes" // CCMP
)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Device video source information
├─ enable boolean Must Whether connecting to AP hotspot is enabled
├─ mode number Must Connecting AP hotspot mode: 0-normal mode, 1-operator hotspot mode
├─ signalLevel number Must Signal strength. 0~100, 0 is the worst, 100 is the best
├─ general object not necessary Ordinary way. Only Mode=0 is meaningful
├─ ssid string not necessary
├─ securityType string not necessary Security typeWifiSecurityType*
├─ cryptType string not necessary Encryption type WifiCryptType*
├─ wepKey string[] not necessary WEP key

item type: string

├─ not necessary
├─ wpaKey string not necessary WPA key
├─ dhcp number Must Whether to use DHCP. 0-not used; 1-used; -1-not supported by the device
├─ pppoe number Must Whether to use PPPoE. 0-not used; 1-used; -1-not supported by the device.
├─ autoDNS boolean Must Whether to automatically obtain DNS, only DHCP=1 or PPPoE=1 is meaningful.
├─ ip string not necessary IP address
├─ netMask string not necessary subnet mask
├─ gateway string not necessary Default gateway
├─ dns string[] not necessary domain name server

item type: string

├─ not necessary
├─ wifiHotSpot object not necessary Hotspot way. It only makes sense if iMode=1
├─ providerAll string[] not necessary List of supported providers. ChinaNet/ChinaMobile/ChinaUniccom

item type: string

├─ not necessary
├─ providerIndex number not necessary Currently using provider
├─ areaAll string[] not necessary List of account opening places. Usually represented by codes, such as bj-Beijing, ah-Anhui,...

item type: string

├─ not necessary
├─ areaIndex number not necessary Place of account opening
├─ userName string not necessary username
├─ password string not necessary password
├─ wifiAP object not necessary wifi AP settings.
├─ enableSetting boolean Must Whether the following configuration can be modified, read-only option, true - can be modified (including modification of bEnable), false - cannot be modified
├─ enable boolean Must Is enable
├─ hideSSID boolean Must Whether to hide SSID
├─ ssid string not necessary SSID Name
├─ safeType number not necessary Authentication mode: 1-No encryption; 2-WEP mode; 3-WPA-PSK mode; 4-WPA2-PSK mode not support WEP
├─ password string not necessary connection key
├─ channel number not necessary Channel [1, 11] default 1
├─ autoChannelSelect boolean not necessary Whether to automatically select the channel
├─ ip string not necessary IP
├─ subMark string not necessary subnet mask
├─ dhcp number not necessary Whether to use DHCP. 0-not used; 1-used; -1-not supported by the device
├─ dhcpStartAddr string not necessary dhcp start IP address is meaningful when DHCP=1
├─ dhcpEndAddr string not necessary dhcp end IP address is meaningful when DHCP=1
├─ macAddr string not necessary wifi mac address, invalid value is empty string, format: ff:ff:ff:ff:ff:ff

Set Wifi configuration

Basic Information

Path: /bvcsp/v1/pu/network/wifi/:puid

Method: PUT

Interface description:

// WifiSecurityType WIFI security type
type WifiSecurityType string

const (
   WifiSecurityTypeOpen WifiSecurityType = "open"
   WifiSecurityTypeShared WifiSecurityType = "shared"
   WifiSecurityTypeWPAPSK WifiSecurityType = "wpa_psk"
   WifiSecurityTypeWPA2PSK WifiSecurityType = "wpa2_psk"
)
// WifiCryptType WIFI encryption type
type WifiCryptType string

const (
   WifiCryptTypeNone WifiCryptType = "none"
   WifiCryptTypeWEP40 WifiCryptType = "wep40" // 64
   WifiCryptTypeWEP104 WifiCryptType = "wep104" // 128
   WifiCryptTypeTKIP WifiCryptType = "tkip"
   WifiCryptTypeAES WifiCryptType = "aes" // CCMP
)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
enable boolean Must Whether connecting to AP hotspot is enabled
mode number Must Connecting AP hotspot mode: 0-normal mode, 1-operator hotspot mode
general object not necessary Ordinary way. Only Mode=0 is meaningful
├─ ssid string not necessary
├─ securityType string not necessary Security typeWifiSecurityType*
├─ cryptType string not necessary Encryption type WifiCryptType*
├─ wepKey string[] not necessary WEP key

item type: string

├─ not necessary
├─ wpaKey string not necessary WPA key
├─ dhcp number not necessary Whether to use DHCP. 0-not used; 1-used; -1-not supported by the device
├─ pppoe number not necessary Whether to use PPPoE. 0-not used; 1-used; -1-not supported by the device.
├─ autoDNS boolean not necessary Whether to automatically obtain DNS, only DHCP=1 or PPPoE=1 is meaningful.
├─ ip string not necessary IP address
├─ netMask string not necessary subnet mask
├─ gateway string not necessary Default gateway
├─ dns string[] not necessary domain name server

item type: string

├─ not necessary
wifiHotSpot object not necessary Hotspot way. It only makes sense if iMode=1
├─ providerIndex number not necessary Currently using provider
├─ areaIndex number not necessary Place of account opening
├─ userName string not necessary username
├─ password string not necessary password
wifiAP object not necessary wifi AP settings.
├─ enable boolean Must Is enable
├─ hideSSID boolean not necessary Whether to hide SSID
├─ ssid string not necessary SSID Name
├─ safeType number not necessary Authentication mode: 1-No encryption; 2-WEP mode; 3-WPA-PSK mode; 4-WPA2-PSK mode not support WEP
├─ password string not necessary connection key
├─ channel number not necessary Channel [1, 11] default 1
├─ autoChannelSelect boolean not necessary Whether to automatically select the channel
├─ ip string not necessary IP
├─ subMark string not necessary subnet mask
├─ dhcp number not necessary Whether to use DHCP. 0-not used; 1-used; -1-not supported by the device
├─ dhcpStartAddr string not necessary dhcp start IP address is meaningful when DHCP=1
├─ dhcpEndAddr string not necessary dhcp end IP address is meaningful when DHCP=1

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get wireless network configuration

Basic Information

Path: /bvcsp/v1/pu/network/radionetwork/:puid

Method: GET

Interface description:

//Wireless network type
type RadioNetworkType string

const (
   RadioNetworkTypeAuto RadioNetworkType = "auto"
   RadioNetworkTypeGPRS RadioNetworkType = "gprs"
   RadioNetworkTypeCDMA RadioNetworkType = "cdma"
   RadioNetworkTypeEDGE RadioNetworkType = "edge"
   RadioNetworkType3GWCDMA RadioNetworkType = "3gwcdma"
   RadioNetworkType3GTDSCDMA RadioNetworkType = "3gtdscdma"
   RadioNetworkType3GCDMA2K RadioNetworkType = "3gcdma2k"
   RadioNetworkType4GTDLTE RadioNetworkType = "4gtdlte"
   RadioNetworkType4GFDLTE    RadioNetworkType = "4gfdlte"
   RadioNetworkType4GLTE RadioNetworkType = "4glte"
   RadioNetworkTypeGSM        RadioNetworkType = "gsm"
   RadioNetworkTypeEDGEPLUS RadioNetworkType = "edgeplus"
   RadioNetworkType3GHSPA RadioNetworkType = "3ghspa"
   RadioNetworkType3GHSPAPLUS RadioNetworkType = "3ghspaplus"
   RadioNetworkType3GCDMA1X RadioNetworkType = "3gcdma1x"
   RadioNetworkType5GNSA RadioNetworkType = "5gnsa"
   RadioNetworkType5GSA       RadioNetworkType = "5gsa"
)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary Device video source information

item type: object

├─ enable boolean Must Whether to use this module
├─ typeAll string[] Must All network types supported by the module. RadioNetworkType*

item type: string

├─ not necessary
├─ typeIndex number Must The type of network currently in use
├─ moduleName string not necessary module name
├─ userName string not necessary username. Set to empty to use the default
├─ password string not necessary password
├─ apn string not necessary APN name. Set to empty to use the default
├─ accessNum string not necessary access number
├─ cardNum string not necessary card number
├─ online boolean Must Is it online?
├─ signalLevel number [] not necessary Signal strength for each network type. 0~100, 0 is the worst, 100 is the best

item type: number

├─ not necessary
├─ onlineTime number not necessary Online time in seconds. Set to -1 to reset the online time.
├─ trafficDownload number not necessary The total downloaded network traffic, in MB bytes. Setting it to -1 means resetting the network traffic
├─ trafficUpload number not necessary The total amount of uploaded network traffic, in MB bytes. Set to -1 to reset the network traffic
├─ speedDownload number not necessary Current download speed in KB/s
├─ speedUpload number not necessary Current upload speed in KB/s
├─ trafficYear number not necessary Total traffic consumed this year, unit MB bytes. Set to -1 to reset the network traffic
├─ trafficMonth number not necessary Total traffic consumed this month, unit MB bytes. Set to -1 to reset the network traffic
├─ trafficDay number not necessary The current consumption of traffic today is in MB bytes. Setting it to -1 means resetting the network traffic.
├─ trafficLastTime number not necessary The total traffic consumed on the last online day, in MB bytes
├─ lastTime number not necessary Last online time (UTC)
├─ monthDay number not necessary Monthly billing date (monthly traffic start date) (1~31)
├─ rebootAfterDialingFatalErr boolean Must Whether to restart the system after a serious dial-up error occurs
├─ IMEIMEID string not necessary Device IMEI/MEID number. Read only
├─ ICCID string not necessary ICCID number of the card. Read only

Set wireless network configuration

Basic Information

Path: /bvcsp/v1/pu/network/radionetwork/:puid

Method: PUT

Interface description:

//Wireless network type
type RadioNetworkType string

const (
   RadioNetworkTypeAuto RadioNetworkType = "auto"
   RadioNetworkTypeGPRS RadioNetworkType = "gprs"
   RadioNetworkTypeCDMA RadioNetworkType = "cdma"
   RadioNetworkTypeEDGE RadioNetworkType = "edge"
   RadioNetworkType3GWCDMA RadioNetworkType = "3gwcdma"
   RadioNetworkType3GTDSCDMA RadioNetworkType = "3gtdscdma"
   RadioNetworkType3GCDMA2K RadioNetworkType = "3gcdma2k"
   RadioNetworkType4GTDLTE RadioNetworkType = "4gtdlte"
   RadioNetworkType4GFDLTE    RadioNetworkType = "4gfdlte"
   RadioNetworkType4GLTE RadioNetworkType = "4glte"
   RadioNetworkTypeGSM        RadioNetworkType = "gsm"
   RadioNetworkTypeEDGEPLUS RadioNetworkType = "edgeplus"
   RadioNetworkType3GHSPA RadioNetworkType = "3ghspa"
   RadioNetworkType3GHSPAPLUS RadioNetworkType = "3ghspaplus"
   RadioNetworkType3GCDMA1X RadioNetworkType = "3gcdma1x"
   RadioNetworkType5GNSA RadioNetworkType = "5gnsa"
   RadioNetworkType5GSA       RadioNetworkType = "5gsa"
)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Body

name type Is must default value Remark other information
object[] not necessary Device video source information

item type: object

├─ enable boolean Must Whether to use this module
├─ typeIndex number Must The type of network currently in use
├─ moduleName string not necessary module name
├─ userName string not necessary username. Set to empty to use the default
├─ password string not necessary password
├─ apn string not necessary APN name. Set to empty to use the default
├─ accessNum string not necessary access number
├─ cardNum string not necessary card number
├─ rebootAfterDialingFatalErr boolean Must Whether to restart the system after a serious dial-up error occurs

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get snapshot configuration

Basic Information

Path: /bvcsp/v1/pu/snapshot/config/:puid/:index

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index channel id

Return data

name type Is must default value Remark other information
code integer Must
msg string Must
data object not necessary
├─ imageSizeAll object[] Must Supported snapshot image resolution. read only

item type: object

├─ Width integer Must width, pixels
├─ Height integer Must height, pixels
├─ imageSizeIndex integer Must The currently used snapshot image resolution. Index of ImageSizeAll
├─ quality integer Must Capture JPG compression quality, value range 1~100
├─ count integer Must Number of pictures taken in a single burst
├─ interval integer Must The time interval between each picture in the continuous shooting. Unit millisecond
├─ delay integer Must Delay time after the end of a continuous shooting cycle. Unit millisecond
├─ maxCount number not necessary Start the manual capture command once, the maximum number of consecutive capture cycles, and then automatically stop capturing. 0: Indicates no limit on the maximum number of cycles
├─ overlay object Must Overlay switch
├─ time boolean Must time
├─ text boolean Must text
├─ gps boolean Must GPS
├─ alarm boolean Must Call the police
├─ name boolean Must Channel name

Set snapshot configuration

Basic Information

Path: /bvcsp/v1/pu/snapshot/config/:puid/:index

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index Channel index

Body

name type Is must default value Remark other information
imageSizeIndex integer Must The currently used snapshot image resolution. Index of ImageSizeAll
quality integer Must Capture JPG compression quality, value range 1~100
count integer Must Number of pictures taken in a single burst
interval integer Must The time interval between each picture in the continuous shooting. Unit millisecond
delay integer Must Delay time after the end of a continuous shooting cycle. Unit millisecond
maxCount number Must Start the manual capture command once, the maximum number of consecutive capture cycles, and then automatically stop capturing. 0: Indicates no limit on the maximum number of cycles
overlay object Must Overlay switch
├─ time boolean Must time
├─ text boolean Must text
├─ gps boolean Must GPS
├─ alarm boolean Must Call the police
├─ name boolean Must Channel name

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must Result description

Get audio input configuration

Basic Information

Path: /bvcsp/v1/pu/audio/in/config/:puid/:index

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index Channel index

Return data

name type Is must default value Remark other information
code integer Must error code
msg string Must Result description
data object not necessary Device audio input configuration
├─ volume integer Must volume
├─ vq object Must audio processing
├─ enableNoise boolean Must Noise reduction enabled
├─ noiseLevel number [] Must Optional noise reduction level, -1 indicates invalid value, read-only

item type: number

├─ not necessary
├─ noiseLevelIndex integer Must Currently used noise reduction level index
├─ enableHalfDuplex boolean Must Half duplex enabled

Set audio input configuration

Basic Information

Path: /bvcsp/v1/pu/audio/in/config/:puid/:index

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index Channel index

Body

name type Is must default value Remark other information
volume integer Must Volume range[0,100]
vq object Must audio processing
├─ enableNoise boolean Must Noise reduction enabled
├─ noiseLevelIndex integer Must Currently used noise reduction level index
enableHalfDuplex boolean Must Half duplex enabled

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must Result description

Get audio output

Basic Information

Path: /bvcsp/v1/pu/audio/out/config/:puid/:index

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index Channel index

Return data

name type Is must default value Remark other information
code integer Must error code
msg string Must Result description
data object not necessary Device audio input configuration
├─ volume integer Must volume

Set audio output

Basic Information

Path: /bvcsp/v1/pu/audio/out/config/:puid/:index

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index Channel index

Body

name type Is must default value Remark other information
volume integer Must Volume range[0,100]

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must Result description

Get encoding properties

Basic Information

Path: /bvcsp/v1/pu/encoderchannel/:puid/:index

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid
index

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary Encoder attribute array

item type: object

├─ type number Must Stream type, 0: storage stream, 1: transport stream
├─ videoCodecAll string[] Must Supported video encoding, H264, H265

item type: string

├─ not necessary
├─ ImageSizeAll object[] Must Supported video encoding resolutions

item type: object

├─ width string Must Pixel width
├─ height string Must Pixel height
├─ rateControlAll string[] Must Supported video rate control types

item type: string

├─ not necessary
├─ videoCodecIndex number Must The currently used video encoder ID. Index of videoCodecAll
├─ imageSizeIndex number Must The currently used video encoding resolution. index of imageSizeAll
├─ rateControl string Must The type of rate control currently in use. Selected value of rateControlAll
├─ framesPerSec number Must Unit 1/1000 frame. For example, 25fps needs to be set to 25*1000.
├─ keyFrameInterval number Must The number of frames between keyframes. For example: 25 means one keyframe every 25 frames.
├─ imageQuality number Must Video encoding quality, value range 1~6
├─ rateLimit number Must The current value of the code rate limit. Unit Kbps
├─ rateLimitCustom number Must Customize the code rate. When 0, use the encoding quality automatic code rate.
├─ overlay object Must Overlay switch
├─ time boolean Must time
├─ text boolean Must text
├─ gps boolean Must GPS
├─ alarm boolean Must Call the police
├─ name boolean Must Channel name
├─ audioCodecAll object[] Must Supported audio codecs

item type: object

├─ audioCodec string Must Supported audio encoder IDs
├─ channelCountAll number [] Must Supported channels

item type: number

├─ not necessary
├─ bitRateAll number [] Must Supported encoding bitrates. Unit bits/s

item type: number

├─ not necessary
├─ bitPerSample number [] Must Sampling accuracy

item type: number

├─ not necessary
├─ samplesPerSec number [] Must Sampling Rate

item type: number

├─ not necessary
├─ channelCountIndex number Must The currently used audio channel. channelCountAll index
├─ bitRateIndex string Must The currently used bitrate. bitRateAll index
├─ bitPerSampleIndex string Must Current sampling accuracy. bitPerSampleAll index
├─ samplesPerSecIndex string Must Current sampling rate. samplesPerSecAll index
├─ audioCodecIndex number Must The currently used audio encoder. Index of audioCodecAll

Set encoding properties

Basic Information

Path: /bvcsp/v1/pu/encoderchannel/:puid/:index

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid
index

Body

name type Is must default value Remark other information
object[] not necessary Encoder attribute array

item type: object

├─ type number Must Stream type, 0: storage stream, 1: transport stream
├─ videoCodecIndex number Must The currently used video encoder ID. Index of videoCodecAll
├─ imageSizeIndex number Must The currently used video encoding resolution. index of imageSizeAll
├─ rateControl string Must The type of rate control currently in use. Selected value of rateControlAll
├─ framesPerSec number Must Unit 1/1000 frame. For example, 25fps needs to be set to 25*1000.
├─ keyFrameInterval number Must The number of frames between keyframes. For example: 25 means one keyframe every 25 frames.
├─ imageQuality number Must Video encoding quality, value range 1~6
├─ rateLimit number Must The current value of the code rate limit. Unit Kbps
├─ rateLimitCustom number not necessary Customize the code rate. When 0, use the encoding quality automatic code rate.
├─ overlay object Must Overlay switch
├─ time boolean Must time
├─ text boolean Must text
├─ gps boolean Must GPS
├─ alarm boolean Must Call the police
├─ name boolean Must Channel name
├─ audioCodecAll object[] Must Supported audio codecs

item type: object

├─ channelCountIndex number Must The currently used audio channel. channelCountAll index
├─ bitRateIndex string Must The currently used bitrate. bitRateAll index
├─ bitPerSampleIndex string Must Current sampling accuracy. bitPerSampleAll index
├─ samplesPerSecIndex string Must Current sampling rate. samplesPerSecAll index
├─ audioCodecIndex number Must The currently used audio encoder. Index of audioCodecAll

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get video source

Basic Information

Path: /bvcsp/v1/pu/video/in/:puid/:index

Method: GET

Interface description:

videoSourceTypes, curVideoSourceType video source type: CMOS, IP

netProtocol network communication protocol:

  1. smarteye
  2. onvif
  3. hik

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index channel id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Device video source information
├─ videoSourceTypeList string[] Must Video input source type array

item type: string

├─ not necessary
├─ curVideoSourceType string Must The type of video input source currently in use.
├─ cmosConfig object not necessary
├─ curIndex number Must The CMOS device number currently in use.
├─ cmosList object[] Must CMOS device list, sorted by device number.

item type: object

├─ cmosIndex number Must CMOS device number, starting from 0 and accumulating.
├─ name string Must CMOS device name, used to identify CMOS devices to users.
├─ ipConfig object not necessary
├─ enable boolean Must Whether it is enabled (only when network IPC discovery/connection and other functions are enabled, the list of discovered devices can be obtained in the next query)
├─ connectType number Must 0 -- single connection 1 --- multiple polling connections
├─ ipConnectList object[] Must The order of the connection list is the order of multi-way polling.

item type: object

├─ enable boolean Must Is enable
├─ status number Must Whether the IP channel is online 0 -- not online 1 --- online
├─ intervalTime number Must Polling time, unit seconds, (0--- represents permanent connection)
├─ netProtocol string Must Network communication protocol
├─ onvifInfo object Must
├─ ipConfigName string Must The name of the ipchannel configuration, which marks the BVCU_CFG_IPChannelInfo role.
├─ ipDevName string Must IP device name obtained through network protocol, read-only (can be empty if this IP device does not have a device name)
├─ ipDevId string Must IP device ID obtained through network protocol, read-only (if this IP device does not have a device ID, it can be empty)
├─ addr string Must
├─ port number Must
├─ userName string Must
├─ password string Must
├─ remoteChannelList number [] Must Channel supported by the remote IP device

item type: number

├─ not necessary
├─ remoteChannelIndex number Must Channel number in the remote IP device
├─ transportProtocolList number [] Must List of transport protocol types see transportProtocol

item type: number

├─ not necessary
├─ transportProtocol number Must Transport protocol type: 0 - tcp 1---udp 2-- multicast, -1--auto (automatic)
├─ transStreamModeList number [] Must Transmission stream type: 0--Auto 1--Main stream 2--Sub stream

item type: number

├─ not necessary
├─ transStreamModeForLocalMainStream number Must The local main stream of the NVR uses the stream type of the remote IP device. The default is that the local main stream corresponds to the remote main stream.
├─ transStreamModeForLocalSubStream number Must The local sub-stream of the NVR uses the code stream type of the remote IP device. The default is that the local sub-stream corresponds to the remote sub-stream.
├─ ipFindList object[] Must IP channel that has not been added to the connection list.

item type: object

├─ enable boolean Must Is enable
├─ status number Must Whether the IP channel is online 0 -- not online 1 --- online
├─ intervalTime number Must Polling time, unit seconds, (0--- represents permanent connection)
├─ netProtocol string Must Network communication protocol
├─ onvifInfo object Must
├─ ipConfigName string Must The name of the ipchannel configuration, which marks the BVCU_CFG_IPChannelInfo role.
├─ ipDevName string Must IP device name obtained through network protocol, read-only (can be empty if this IP device does not have a device name)
├─ ipDevId string Must IP device ID obtained through network protocol, read-only (if this IP device does not have a device ID, it can be empty)
├─ addr string Must
├─ port number Must
├─ userName string Must
├─ password string Must
├─ remoteChannelList number [] Must Channel supported by the remote IP device

item type: number

├─ not necessary
├─ remoteChannelIndex number Must Channel number in the remote IP device
├─ transportProtocolList number [] Must List of transport protocol types see transportProtocol

item type: number

├─ not necessary
├─ transportProtocol number Must Transport protocol type: 0 - tcp 1---udp 2-- multicast, -1--auto (automatic)
├─ transStreamModeList number [] Must Transmission stream type: 0--Auto 1--Main stream 2--Sub stream

item type: number

├─ not necessary
├─ transStreamModeForLocalMainStream number Must The local main stream of the NVR uses the stream type of the remote IP device. The default is that the local main stream corresponds to the remote main stream.
├─ transStreamModeForLocalSubStream number Must The local sub-stream of the NVR uses the code stream type of the remote IP device. The default is that the local sub-stream corresponds to the remote sub-stream.

Set video source

Basic Information

Path: /bvcsp/v1/pu/video/in/:puid/:index

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid device id
index channel id

Body

name type Is must default value Remark other information
videoSourceTypeList string[] Must Video input source type array

item type: string

├─ not necessary
curVideoSourceType string Must The type of video input source currently in use.
cmosConfig object not necessary
├─ curIndex number Must The CMOS device number currently in use.
├─ cmosList object[] Must CMOS device list, sorted by device number.

item type: object

├─ cmosIndex number Must CMOS device number, starting from 0 and accumulating.
├─ name string Must CMOS device name, used to identify CMOS devices to users.
ipConfig object not necessary
├─ enable boolean Must Whether it is enabled (only when network IPC discovery/connection and other functions are enabled, the list of discovered devices can be obtained in the next query)
├─ connectType number Must 0 -- single connection 1 --- multiple polling connections
├─ ipConnectList object[] Must The order of the connection list is the order of multi-way polling.

item type: object

├─ enable boolean Must Is enable
├─ status number Must Whether the IP channel is online 0 -- not online 1 --- online
├─ intervalTime number Must Polling time, unit seconds, (0--- represents permanent connection)
├─ netProtocol string Must Network communication protocol
├─ onvifInfo object Must
├─ ipConfigName string Must The name of the ipchannel configuration, which marks the BVCU_CFG_IPChannelInfo role.
├─ ipDevName string Must IP device name obtained through network protocol, read-only (can be empty if this IP device does not have a device name)
├─ ipDevId string Must IP device ID obtained through network protocol, read-only (if this IP device does not have a device ID, it can be empty)
├─ addr string Must
├─ port number Must
├─ userName string Must
├─ password string Must
├─ remoteChannelList number [] Must Channel supported by the remote IP device

item type: number

├─ not necessary
├─ remoteChannelIndex number Must Channel number in the remote IP device
├─ transportProtocolList number [] Must List of transport protocol types see transportProtocol

item type: number

├─ not necessary
├─ transportProtocol number Must Transport protocol type: 0 - tcp 1---udp 2-- multicast, -1--auto (automatic)
├─ transStreamModeList number [] Must Transmission stream type: 0--Auto 1--Main stream 2--Sub stream

item type: number

├─ not necessary
├─ transStreamModeForLocalMainStream number Must The local main stream of the NVR uses the stream type of the remote IP device. The default is that the local main stream corresponds to the remote main stream.
├─ transStreamModeForLocalSubStream number Must The local sub-stream of the NVR uses the code stream type of the remote IP device. The default is that the local sub-stream corresponds to the remote sub-stream.
├─ ipFindList object[] Must IP channel that has not been added to the connection list.

item type: object

├─ enable boolean Must Is enable
├─ status number Must Whether the IP channel is online 0 -- not online 1 --- online
├─ intervalTime number Must Polling time, unit seconds, (0--- represents permanent connection)
├─ netProtocol string Must Network communication protocol
├─ onvifInfo object Must
├─ ipConfigName string Must The name of the ipchannel configuration, which marks the BVCU_CFG_IPChannelInfo role.
├─ ipDevName string Must IP device name obtained through network protocol, read-only (can be empty if this IP device does not have a device name)
├─ ipDevId string Must IP device ID obtained through network protocol, read-only (if this IP device does not have a device ID, it can be empty)
├─ addr string Must
├─ port number Must
├─ userName string Must
├─ password string Must
├─ remoteChannelList number [] Must Channel supported by the remote IP device

item type: number

├─ not necessary
├─ remoteChannelIndex number Must Channel number in the remote IP device
├─ transportProtocolList number [] Must List of transport protocol types see transportProtocol

item type: number

├─ not necessary
├─ transportProtocol number Must Transport protocol type: 0 - tcp 1---udp 2-- multicast, -1--auto (automatic)
├─ transStreamModeList number [] Must Transmission stream type: 0--Auto 1--Main stream 2--Sub stream

item type: number

├─ not necessary
├─ transStreamModeForLocalMainStream number Must The local main stream of the NVR uses the stream type of the remote IP device. The default is that the local main stream corresponds to the remote main stream.
├─ transStreamModeForLocalSubStream number Must The local sub-stream of the NVR uses the code stream type of the remote IP device. The default is that the local sub-stream corresponds to the remote sub-stream.

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get device GPS configuration

Basic Information

Path: /bvcsp/v1/pu/gpsconfig/:puid

Method: GET

Interface description:

"gps"   //US GPS satellite
"bds"   // China Beidou Satellite
"glonass"// Russian GLONASS satellite
"Galiteo"// European Galileo satellite
"qzss"   // Japanese quasi-zenith satellite

Parameters

Headers

parameter name Parameter value Is must Example Remark
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must Result description
data object Must
├─ name string not necessary Module name (read only)
├─ supportSignal string[] not necessary Supported satellite signals (read only)

item type: string

├─ not necessary
├─ setupSignal string[] not necessary satellite signal used

item type: string

├─ not necessary
├─ enable boolean not necessary Is enable
├─ reportInterval number not necessary Reporting interval, in seconds
├─ reportDistance string not necessary Reported distance interval in meters

Set device GPS configuration

Basic Information

Path: /bvcsp/v1/pu/gpsconfig/:puid

Method: POST

Interface description:

"gps"   // U.S. GPS satellite
"bds"   // China Beidou Satellite
"glonass"// Russian GLONASS satellite
"Galiteo"// European Galileo satellite
"qzss"   // Japanese quasi-zenith satellite

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
setupSignal string[] not necessary satellite signal used

item type: string

├─ not necessary
enable boolean not necessary Is enable
reportInterval number not necessary Reporting interval, in seconds
reportDistance string not necessary Reported distance interval in meters

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description

Get device server configuration

Basic Information

Path: /bvcsp/v1/pu/serverconfigs/:puid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must Result description
data object Must
├─ registerServer object Must Register server information
├─ addr string Must Server IP or domain name
├─ port number Must Server port
├─ proto string Must Protocol type used, TCP/UDP
├─ keepAliveInterval number Must Device heartbeat timeout, in seconds. If the device cannot receive a heartbeat packet reply after this time, the server is considered offline. Range: 45-200
├─ username string Must Login Username
├─ password string Must login password
├─ timeSource object Must Time server information
├─ timeZone number Must local time zone
├─ dst boolean Must Whether to use daylight saving time.
├─ ntpPriority number Must NTP priority 1-100, <=0 means not used</span>
├─ gpsPriority number Must GPS priority 1-100, <=0 means not used. Only relevant for GPS-enabled devices</span>
├─ ntpServer object Must
├─ addr string[] Must Server IP or domain name

item type: string

├─ not necessary
├─ port number [] Must Server port

item type: number

├─ not necessary
├─ updateInterval number Must Update interval, unit: minutes
├─ reserveServer object Must Alternate registration server
├─ addr string Must Server IP or domain name
├─ port number Must Server port
├─ proto string Must Protocol type used, TCP/UDP
├─ keepAliveInterval number Must Device heartbeat timeout, in seconds. If the device cannot receive a heartbeat packet reply after this time, the server is considered offline. Range: 45-200
├─ username string Must Login Username
├─ password string Must login password

Set device server configuration

Basic Information

Path: /bvcsp/v1/pu/serverconfigs/:puid

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
registerServer object Must Register server information
├─ addr string Must Server IP or domain name
├─ port number Must Server port
├─ proto string Must Protocol type used, TCP/UDP
├─ keepAliveInterval number Must Device heartbeat timeout, in seconds. If the device cannot receive a heartbeat packet reply after this time, the server is considered offline. Range: 45-200
├─ username string Must Login Username
├─ password string Must login password
timeSource object Must Time server information
├─ timeZone number Must local time zone
├─ dst boolean Must Whether to use daylight saving time.
├─ ntpPriority number Must NTP priority 1-100, <=0 means not used</span>
├─ gpsPriority number Must GPS priority 1-100, <=0 means not used. Only relevant for GPS-enabled devices</span>
├─ ntpServer object Must
├─ addr string[] Must Server IP or domain name

item type: string

├─ not necessary
├─ port number [] Must Server port

item type: number

├─ not necessary
├─ updateInterval number Must Update interval, unit: minutes
├─ updateImmediately boolean Must Sync now
reserveServer object Must Alternate registration server
├─ addr string Must Server IP or domain name
├─ port number Must Server port
├─ proto string Must Protocol type used, TCP/UDP
├─ keepAliveInterval number Must Device heartbeat timeout, in seconds. If the device cannot receive a heartbeat packet reply after this time, the server is considered offline. Range: 45-200
├─ username string Must Login Username
├─ password string Must login password

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description

Get device memory information

Basic Information

Path: /bvcsp/v1/pu/storages/:puid

Method: GET

Interface description:

storageMediaType: storage type
    sdcard // SD card
    hdd // hard disk

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary memory list

item type: object

├─ storageMediaType string Must Storage media type.
├─ storageID number Must storage media id
├─ partitions object[] Must Partition list

item type: object

├─ name string Must A name or path that uniquely identifies the partition
├─ fsFormat string Must file system format
├─ totalSpace number Must total space. Unit MB
├─ freeSpace number Must remaining space. Unit MB
├─ bFormated number Must Whether it has been formatted, 0-not formatted, 1-formatted
├─ bDisable number Must Whether to disable storing files on this disk. 0-not disabled, 1-disabled.

Set device memory information

Basic Information

Path: /bvcsp/v1/pu/storages/:puid

Method: PUT

Interface description:

storageMediaType: storage type
    sdcard // SD card
    hdd // hard disk

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
object[] not necessary memory list

item type: object

├─ storageMediaType string Must Storage media type.
├─ storageID number Must storage media id
├─ partitions object[] Must Partition list

item type: object

├─ name string Must A name or path that uniquely identifies the partition
├─ bDisable number Must Whether to disable storing files on this disk. 0-not disabled, 1-disabled.

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get formatting progress

Basic Information

Path: /bvcsp/v1/pu/format/:puid/:id

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid device id
ID memory id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Format progress
├─ storageID number Must storage media id
├─ action number Must 0- Not formatted, 1- Formatting in progress;
├─ percent number Must Query the formatting progress returned (meaningful when iAction==1). The normal value is 0~100. 100 means formatting is completed, and the special value -1 means formatting failed.

Format memory

Basic Information

Path: /bvcsp/v1/pu/format/:puid/:id

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid device id
ID memory id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get device storage settings

Basic Information

Path: /bvcsp/v1/pu/storage/config/:puid

Method: GET

Interface description:

File naming rules:

value illustrate
0 Default format
1 Device ID
2 Device Name
4 Custom string

Parameters

Headers

parameter name Parameter value Is must Example Remark
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ noSpaceRule number not necessary Rules for handling when memory is full. 0-stop recording, 1-overwrite old recording
├─ alarmSpace number not necessary Insufficient space alarm threshold. Unit: MB. Set to 0 to indicate no alarm
├─ reserveDays number not necessary Number of days to retain video files
├─ recordFileLength number not necessary The length of the video file. Unit seconds.
├─ recordGps number not necessary Whether to store GPS information. 0-Do not store, 1-Save.
├─ videoFileNameRule number not necessary Audio and video file naming rules
├─ picFileNameRule number not necessary Image file naming rules
├─ VideoFileName string not necessary Custom audio and video file name
├─ picFileName string not necessary Custom image file name

Modify device storage settings

Basic Information

Path: /bvcsp/v1/pu/storage/config/:puid

Method: POST

Interface description:

File naming rules:

value illustrate
0 Default format
1 Device ID
2 Device Name
4 Custom string

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
noSpaceRule number Must Rules for handling when memory is full. 0-stop recording, 1-overwrite old recording
alarmSpace number Must Insufficient space alarm threshold. Unit: MB. Set to 0 to indicate no alarm
reserveDays number Must Number of days to retain video files
recordFileLength number Must The length of the video file. Unit seconds.
recordGps number Must Whether to store GPS information. 0-Do not store, 1-Save.
videoFileNameRule number Must Audio and video file naming rules
picFileNameRule number Must Image file naming rules
VideoFileName string Must Custom audio and video file name
picFileName string Must Custom image file name

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get storage status

Basic Information

Path: /bvcsp/v1/pu//storages/recordstatus/:puid

Method: GET

Interface description:

Parameters

path parameters

parameter name Example Remark
puid DeviceId

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must title
├─ recordVideo boolean Must Is the video being stored?
├─ recordAudio boolean Must Whether audio is being stored
├─ recordGPS boolean Must Whether GPS is being stored
├─ recordImage boolean Must Whether the captured image is being stored
├─ fileNames string[] Must File path being stored + file name

item type: string

├─ not necessary

Get storage plan

Basic Information

Path: /bvcsp/v1/pu/storage/schedule/:puid/:index

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index channel id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ weekSnapshot object[] Must One week's capture time slot

item type: object

├─ week number Must
├─ hour number Must
├─ minute number Must
├─ second number Must
├─ duration number Must
├─ weekRecord object[] Must A week of video time slices

item type: object

├─ week number Must
├─ hour number Must
├─ minute number Must
├─ second number Must
├─ duration number Must
├─ recordAudio number Must Whether to record audio. 0-do not store, 1-store
├─ begin number Must Start time unix timestamp, seconds
├─ end number Must End Time. The plan is valid within the start/end time range. unix timestamp, seconds

Set storage plan

Basic Information

Path: /bvcsp/v1/pu/storage/schedule/:puid/:index

Method: PUT

Interface description:

Older devices only support up to 6 time slices per day
Do not support cross-day time slices

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index channel id

Body

name type Is must default value Remark other information
weekSnapshot object[] Must One week's capture time slot

item type: object

├─ week number Must
├─ hour number Must
├─ minute number Must
├─ second number Must
├─ duration number Must
weekRecord object[] Must A week of video time slices

item type: object

├─ week number Must
├─ hour number Must
├─ minute number Must
├─ second number Must
├─ duration number Must
recordAudio number Must Whether to record audio. 0-do not store, 1-store
begin number Must Start time unix timestamp, seconds
end number Must End Time. The plan is valid within the start/end time range. unix timestamp, seconds

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must Result description

Get overlay information

Basic Information

Path: /bvcsp/v1/pu/overlay/:puid/:index

Method: GET

Interface description:

// Note: The separator between the year, month and day in the format 1/2/9/10/11/12 is determined by BVCU_PUCFG_VideoIn.cOSDTimeSplitChar
    BVCU_OSD_TIMEFORMAT_INVALID = 0,//Do not superimpose time
    BVCU_OSD_TIMEFORMAT_1 = 1,// YYYY-MM-DD hh:mm:ss
    BVCU_OSD_TIMEFORMAT_2 = 2,// YYYY-MM-DD day of the week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_3 = 3,//DD day MM month YYYY year hh:mm:ss
    BVCU_OSD_TIMEFORMAT_4 = 4,// DD day MM month YYYY year week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_5 = 5,// MM month DD day YYYY year hh:mm:ss
    BVCU_OSD_TIMEFORMAT_6 = 6,//MM month DD day YYYY year week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_7 = 7,// YYYY year MM month DD day hh:mm:ss
    BVCU_OSD_TIMEFORMAT_8 = 8,// YYYY year MM month DD day week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_9 = 9,// DD-MM-YYYY hh:mm:ss
    BVCU_OSD_TIMEFORMAT_10 = 10,// DD-MM-YYYY Day of the week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_11 = 11,// MM-DD-YYYY hh:mm:ss
    BVCU_OSD_TIMEFORMAT_12 = 12,// MM-DD-YYYY Day of the week W hh:mm:ss

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
index

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Device overlay information
├─ title object Must Text overlay information
├─ title string Must Text content
├─ config object not necessary Location
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size
├─ time object Must Overlay real time
├─ format number Must Overlay time format, BVCU-OSD-TIMEFORMAT_*
├─ splitChar string Must Separator between YYYY-MM-DD. Common ones are '.' '-' and '/'.
├─ config object not necessary Location
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size
├─ gps object Must overlay gps data
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size
├─ channel object Must Overlay channel name
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size

Set overlay information

Basic Information

Path: /bvcsp/v1/pu/overlay/:puid/:index

Method: PUT

Interface description:

// Note: The separator between the year, month and day in the format 1/2/9/10/11/12 is determined by BVCU_PUCFG_VideoIn.cOSDTimeSplitChar
    BVCU_OSD_TIMEFORMAT_INVALID = 0,//Do not superimpose time
    BVCU_OSD_TIMEFORMAT_1 = 1,// YYYY-MM-DD hh:mm:ss
    BVCU_OSD_TIMEFORMAT_2 = 2,// YYYY-MM-DD day of the week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_3 = 3,//DD day MM month YYYY year hh:mm:ss
    BVCU_OSD_TIMEFORMAT_4 = 4,// DD day MM month YYYY year week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_5 = 5,// MM month DD day YYYY year hh:mm:ss
    BVCU_OSD_TIMEFORMAT_6 = 6,//MM month DD day YYYY year week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_7 = 7,// YYYY year MM month DD day hh:mm:ss
    BVCU_OSD_TIMEFORMAT_8 = 8,// YYYY year MM month DD day week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_9 = 9,// DD-MM-YYYY hh:mm:ss
    BVCU_OSD_TIMEFORMAT_10 = 10,// DD-MM-YYYY Day of the week W hh:mm:ss
    BVCU_OSD_TIMEFORMAT_11 = 11,// MM-DD-YYYY hh:mm:ss
    BVCU_OSD_TIMEFORMAT_12 = 12,// MM-DD-YYYY Day of the week W hh:mm:ss

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid device id
index

Body

name type Is must default value Remark other information
title object Must Text overlay information
├─ title string Must Text content
├─ config object not necessary Location
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size
time object Must Overlay real time
├─ format number Must Overlay time format, BVCU-OSD-TIMEFORMAT_*
├─ splitChar string Must Separator between YYYY-MM-DD. Common ones are '.' '-' and '/'.
├─ config object not necessary Location
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size
gps object Must overlay gps data
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size
channel object Must Overlay channel name
├─ left number Must
├─ top number Must
├─ fontSize number not necessary font size

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get upgrade firmware status

Basic Information

Path: /bvcsp/v1/pu/upgrade/:puid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Upgrade status
├─ percent number Must Upgrade percentage, 0-100, -1 indicates not in upgrade status
├─ speed number Must Download speed, unit KB/s. < 0 indicates an upgrade error, see BVCU_RESULT_E_*.
├─ softwareVersion string Must current software version
├─ updateFinishTime number Must Current software version upgrade completion time, UTC time

Upgrade firmware

Basic Information

Path: /bvcsp/v1/pu/upgrade/:puid

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
fileid string Must Specified file ID
promptly number Must Whether to upgrade immediately, 0 - upgrade at next startup, 1 - upgrade immediately

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get law enforcement

Basic Information

Path: /bvcsp/v1/pu/zfyinfo/:puid

Method: GET

Interface description:

Police type:

   "traffic" // traffic police
   "tourist" // tourist police
   "patrol" // patrol police

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Upgrade status
├─ deviceModel string Must Device model, read only
├─ IMEIMEID string Must Device IMEI/MEID number. Read only
├─ serial string Must Product serial number, cannot be empty. Can be written
├─ userNo string Must User alert number, cannot be empty. writable
├─ userName string Must User name. writable
├─ userDescribe string Must User description. writable
├─ unitNo string Must User unit number. writable
├─ unitName string Must User organization name. writable
├─ postName string Must User position/position name. writable
├─ policeType string Must Police type, writable
├─ defaultConference string Must Default speaking conference ID. writable
├─ currentConference string Must The current speaking conference ID. read only

Set law enforcement

Basic Information

Path: /bvcsp/v1/pu/zfyinfo/:puid

Method: PUT

Interface description:

Police type:

   "traffic" // traffic police
   "tourist" // tourist police
   "patrol" // patrol police

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Body

name type Is must default value Remark other information
serial string not necessary Product serial number, cannot be empty. Can be written
userNo string not necessary User alert number, cannot be empty. writable
userName string not necessary User name. writable
userDescribe string not necessary User description. writable
unitNo string not necessary User unit number. writable
unitName string not necessary User organization name. writable
postName string not necessary User position/position name. writable
policeType string not necessary Police type, writable
defaultConference string not necessary Default speaking conference ID. writable

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get sensor data

Basic Information

Path: /bvcsp/v1/pu/sensor/data/:puid

Method: GET

Interface description:

Key value enumeration (ignoring case):
	 body_P heart rate
	 body_T body temperature
	 body_BP blood pressure
	 body_RR respiratory rate
	 body_SpO2 blood oxygen saturation
	 gas_O2 oxygen
	 gas_H2S hydrogen sulfide
	 gas_CO carbon monoxide
	 gas_CO2 carbon dioxide
	 gas_CH4 methane

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid Device ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary

item type: object

├─ key string Must type of data
├─ unit string Must unit string
├─ reading number Must The current value
├─ bAlarm boolean not necessary Is the alarm being called?
├─ alarm_min number not necessary Alarm threshold offline
├─ alarm_max number not necessary Alarm threshold online

Set sensor data

Basic Information

Path: /bvcsp/v1/pu/sensor/data/:puid

Method: PUT

Interface description:

Key value enumeration (ignoring case):
	 body_P heart rate
	 body_T body temperature
	 body_BP blood pressure
	 body_RR respiratory rate
	 body_SpO2 blood oxygen saturation
	 gas_O2 oxygen
	 gas_H2S hydrogen sulfide
	 gas_CO carbon monoxide
	 gas_CO2 carbon dioxide
	 gas_CH4 methane

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid Device ID

Body

name type Is must default value Remark other information
object[] not necessary

item type: object

├─ key string Must type of data
├─ alarm_min number Must Alarm threshold offline
├─ alarm_max number Must Alarm threshold online

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

PTZ

PTZ lens control

Basic Information

Path: /bvcsp/v1/pu/ptz/camera/:puid/:index

Method: POST

Interface description:

The operate values are as follows:
    // direction operation
    "up" // Up.
    "down" // Down.
    "left"      // left。
    "right" // To the right.
    "lefttop" // Top left.
    "righttop" // Top right.
    "leftdown" // Bottom left.
    "rightdown" // right down

    // Lens operation
    "zoominc" // Increase magnification.
    "zoomdec" // Decrease the magnification.
    "focusinc" // Adjust the focus farther.
    "focusdec" // Adjust the focus closer.
    "apertureinc" // Aperture enlargement.
    "aperturedec" // Stop down the aperture.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index

Body

name type Is must default value Remark other information
operate string Must Operation type
hSpeed number Must horizontal speed
vSpeed number Must vertical speed
stop boolean Must Whether to stop

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get the PTZ preset point list

Basic Information

Path: /bvcsp/v1/pu/ptz/presetlist/:puid/:index

Method: GET

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object[] not necessary

item type: object

├─ ID number Must Preset point number. -1 means invalid, valid value is 0-255
├─ name string not necessary Preset roll call

Add PTZ preset point

Basic Information

Path: /bvcsp/v1/pu/ptz/preset/add/:puid/:index

Method: POST

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index

Body

name type Is must default value Remark other information
ID number Must Preset point number. -1 means invalid, valid value is 0-255
name string Must Preset roll call

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify PTZ preset point

Basic Information

Path: /bvcsp/v1/pu/ptz/preset/mod/:puid/:index/:id

Method: PUT

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index
ID PTZ preset point id

Body

name type Is must default value Remark other information
name string Must Preset roll call

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete PTZ preset point operation

Basic Information

Path: /bvcsp/v1/pu/ptz/preset/del/:puid/:index/:id

Method: DELETE

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index
ID PTZ preset point id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Go to PTZ preset point

Basic Information

Path: /bvcsp/v1/pu/ptz/preset/go/:puid/:index/:id

Method: PUT

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index
ID Preset point number. -1 means invalid, valid value is 0-255

Body

name type Is must default value Remark other information
hSpeed number Must Horizontal speed, needs to be set when going to the preset point, speed range 0-100
vSpeed number Must Vertical speed, it needs to be set when going to the preset point, the speed range is 0-100

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get the list of PTZ cruise routes

Basic Information

Path: /bvcsp/v1/pu/ptz/cruiselist/:puid/:index

Method: GET

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object[] not necessary

item type: object

├─ ID number Must Cruise route number. -1 means invalid, valid values start from 0
├─ name string Must Cruise route name. The unset cruise route name is empty
├─ points object[] Must Cruising points on the cruising route. Convention: Valid cruise points are placed in front of the array, and points after the first invalid cruise point in the array are considered invalid points.

item type: object

├─ ID number Must Preset point number. -1 indicates an invalid value
├─ hSpeed number Must Horizontal speed, needs to be set when going to the preset point, speed range 0-100
├─ vSpeed number Must Vertical speed, it needs to be set when going to the preset point, the speed range is 0-100
├─ duration number Must Residence time at this preset point, unit seconds

Add gimbal cruise route

Basic Information

Path: /bvcsp/v1/pu/ptz/cruise/add/:puid/:index

Method: POST

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index

Body

name type Is must default value Remark other information
ID number Must Cruise route number. -1 means invalid, valid values start from 0
name string Must Cruise route name. The unset cruise route name is empty
points object[] Must Cruising points on the cruising route. Convention: Valid cruise points are placed in front of the array, and points after the first invalid cruise point in the array are considered invalid points.

item type: object

├─ ID number Must Preset point number. -1 indicates an invalid value
├─ hSpeed number Must Horizontal speed, needs to be set when going to the preset point, speed range 0-100
├─ vSpeed number Must Vertical speed, it needs to be set when going to the preset point, the speed range is 0-100
├─ duration number Must Residence time at this preset point, unit seconds

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Start the PTZ cruise route

Basic Information

Path: /bvcsp/v1/pu/ptz/cruise/start/:puid/:index/:id

Method: PUT

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index
ID cruise route id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Stop the gimbal cruise route

Basic Information

Path: /bvcsp/v1/pu/ptz/cruise/stop/:puid/:index/:id

Method: PUT

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index
ID Cruise route ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete gimbal cruise route

Basic Information

Path: /bvcsp/v1/pu/ptz/cruise/del/:puid/:index/:id

Method: DELETE

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
puid Device ID
index Channel PTZ index
ID Cruise route ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

IM group

Get group list

Basic Information

Path: /bvcsp/v1/imgroup/list

Method: POST

Interface description:

IM groups can include chat groups for both devices and users (MCP cannot join the group as a device, but can only join as a user to prevent two online instances).
Based on the group, you can create audio and video conferences and invite group members to participate.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary Filter conditions
├─ match string not necessary Fuzzy match group name

mock: root node

├─ filterCondition number not necessary 0-Query the list of your own cluster; 1-Query the list of clusters with management permissions; requires group + user management permissions

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary group list

item type: object

├─ ID string Must Group ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ expireDelete number not necessary Timeout deletion time, unit seconds, minimum 10 seconds. If there is no voice conference activity during this period, the group will be automatically deleted. It is mainly used for temporary groups.

Get list of group members

Basic Information

Path: /bvcsp/v1/imgroup/members/list/:groupid

Method: POST

Interface description:

The member name in the member refers to the name of the device (or user), which is different from the name in the group.
Both member ID and member object ID can be used as unique identifiers to operate members.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 123456 Group ID

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

needStatus boolean not necessary Whether the user's online status is required. No online status is required to increase acquisition speed.

mock: false

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching member account/device ID/alias

mock: admin

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary Member list

item type: object

├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: PU

├─ memberName string Must Member name (user/device name)

mock: emulator0

├─ name string not necessary Group name

mock: Zhang San

├─ permissions object[] Must Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: master,manager

Enumeration notes: Group owner, administrator

├─ level number not necessary Permission level, 0: no permission

mock: 0

├─ status number not necessary Online status: 0: Not online; 1: Online.

mock: 0

Get group member information

Basic Information

Path: /bvcsp/v1/imgroup/member/info/:groupid/:memberid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 123456 Group ID
memberid 123 Group member object ID (device/user) ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must Member information
├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: admin

├─ memberName string Must Member name (user/device name)

mock: admin

├─ name string not necessary Group name

mock: Zhang San

├─ permissions object[] not necessary Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: master,manager

Enumeration notes: Group owner, administrator

├─ level number not necessary Permission level, 0: no permission

mock: 0

├─ status number not necessary Online status: 0: Not online; 1: Online.

Get group information

Basic Information

Path: /bvcsp/v1/imgroup/info/:groupid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 123456 Group ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must Group ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ expireDelete number not necessary Timeout deletion time, unit seconds, minimum 10 seconds. If there is no voice conference activity during this period, the group will be automatically deleted. It is mainly used for temporary groups.

Create group

Basic Information

Path: /bvcsp/v1/imgroup/create

Method: POST

Interface description:

IM groups can include chat groups for both devices and users (MCP cannot join the group as a device, but can only join as a user to prevent two online instances).
Based on the group, you can create audio and video conferences and invite group members to participate.

When expireDelete>0, it means a temporary group. The temporary group will automatically create a meeting. If no one speaks in the meeting for a period of time, the meeting will automatically end and the group will be automatically deleted.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
name string Must Group name

mock: xxx group chat

desc string not necessary Group introduction
expireDelete number not necessary Timeout deletion time, unit seconds, minimum 10 seconds. If there is no voice conference activity during this period, the group will be automatically deleted. It is mainly used for temporary groups.

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must Group ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ expireDelete number not necessary Timeout deletion time, unit seconds, minimum 10 seconds. If there is no voice conference activity during this period, the group will be automatically deleted. It is mainly used for temporary groups.

Edit group

Basic Information

Path: /bvcsp/v1/imgroup/:groupid

Method: PUT

Interface description:

Requires group owner/administrator permissions.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid 123456 Group ID

Body

name type Is must default value Remark other information
name string not necessary Group name

mock: xxx group chat

desc string not necessary Description of the group

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must group information
├─ ID string Must Group ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ expireDelete number not necessary Timeout deletion time, unit seconds, minimum 10 seconds. If there is no voice conference activity during this period, the group will be automatically deleted. It is mainly used for temporary groups.

Delete group

Basic Information

Path: /bvcsp/v1/imgroup/:groupid

Method: DELETE

Interface description:

Group owner are required.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid 123456 Group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Add group members

Basic Information

Path: /bvcsp/v1/imgroup/members/add/:groupid

Method: POST

Interface description:

Requires group owner/administrator permissions. Administrators cannot delete administrator members (group owners can).
MCP devices cannot join the group as a device. MCP is for users, and they need to join the group as a user.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid Group ID

Body

name type Is must default value Remark other information
members object[] Must Added object array

item type: object

├─ memberID string not necessary Member object ID: device ID/user ID

mock: PU_0

├─ memberType string not necessary "PU"/"User"

mock: PU

├─ name string not necessary Group name

mock: Zhang San

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] Must Successfully added member

item type: object

├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: PU

├─ memberName string Must Member name (user/device name)

mock: emulator

├─ name string not necessary Group name

mock: Zhang San

├─ permissions object[] Must Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: master,manager

Enumeration notes: Group owner, administrator

├─ level number not necessary Permission level, 0: no permission

mock: 0

Delete group members

Basic Information

Path: /bvcsp/v1/imgroup/members/del/:groupid

Method: POST

Interface description:

Requires group owner/administrator permissions. Administrators cannot delete administrator members (group owners can).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid Group ID

Body

name type Is must default value Remark other information
members object[] not necessary Delete member

item type: object

├─ ID number Must Member ID

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Modify other group members

Basic Information

Path: /bvcsp/v1/imgroup/member/info/:groupid/:id

Method: POST

Interface description:

Group owner/administrator permissions are required. Only the group owner can modify the permissions of other members (group owner permissions cannot be included).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 123456 Group ID
ID 11235 Member ID

Body

name type Is must default value Remark other information
name string Must Group name

mock: Zhang San

permissions object[] not necessary Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: master,manager

Enumeration notes: Group owner, administrator

├─ level number not necessary Permission level, 0: no permission

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must Member information
├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: admin

├─ memberName string Must Member name (user/device name)

mock: admin

├─ name string not necessary Group name

mock: Zhang San

├─ permissions object[] not necessary Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: master,manager

Enumeration notes: Group owner, administrator

├─ level number not necessary Permission level, 0: no permission

mock: 0

Modify your group nickname

Basic Information

Path: /bvcsp/v1/imgroup/member/myname/:groupid

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 123456 Group ID

Body

name type Is must default value Remark other information
name string Must Group name

mock: Zhang San

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must Member information
├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: admin

├─ memberName string Must Member name (user/device name)
├─ name string Must Group name

mock: Zhang San

├─ permissions object[] not necessary Permission list

item type: object

├─ ID string not necessary Permission ID

enumerate: master,manager

Enumeration notes: Group owner, administrator

├─ level number not necessary Permission level, 0: no permission

mock: 0

Create meeting

Basic Information

Path: /bvcsp/v1/imgroup/conference/create

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must Meeting information
├─ ID string Must Group ID

mock: 000000

├─ createTime integer not necessary creation time

Delete meeting

Basic Information

Path: /bvcsp/v1/imgroup/conference/:groupid

Method: DELETE

Interface description:

Group owner are required.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get meeting information

Basic Information

Path: /bvcsp/v1/imgroup/conference/info/:groupid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid Group ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must Group ID

mock: 000000

├─ createTime number not necessary creation time

mock: @timestamp

Get the list of meeting members

Basic Information

Path: /bvcsp/v1/imgroup/conference/members/:groupid

Method: GET

Interface description:

Meeting members are a subset of group members, and there is a limit to the number of members participating in the meeting at the same time (1000).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid Group ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary Member list

item type: object

├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: PU

├─ status number Must Status: 0: Offline; 1: Joining; 2: Already joined. 3: Speaking.

mock: 0

├─ defaultConf boolean not necessary Is it the default conference?
├─ current boolean not necessary Is it the current user?
├─ deviceId string not necessary Online Device ID(PU or UA)

Get conference member information

Basic Information

Path: /bvcsp/v1/imgroup/conference/member/info/:groupid/:memberid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid 123456 Group ID
memberid Member object ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must Member information
├─ ID number Must Member ID

mock: 0

├─ memberID string Must Member object ID: device ID/user ID

mock: PU_0

├─ memberType string Must "PU"/"User"

mock: PU

├─ status number Must Status: 0: Offline; 1: Joining; 2: Already joined. 3: Speaking.

mock: 0

├─ defaultConf boolean not necessary Is it the default conference?
├─ current boolean not necessary Is it the current user?
├─ deviceId string not necessary Online Device ID(PU or UA)

Join the meeting yourself

Basic Information

Path: /bvcsp/v1/imgroup/conference/join/apply/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Exit the meeting yourself

Basic Information

Path: /bvcsp/v1/imgroup/conference/quit/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Apply to speak

Basic Information

Path: /bvcsp/v1/imgroup/conference/speak/apply/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

End speech

Basic Information

Path: /bvcsp/v1/imgroup/conference/speak/end/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Body

name type Is must default value Remark other information
memberID string not necessary Member object ID, empty: represents itself

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Invite others to join a meeting

Basic Information

Path: /bvcsp/v1/imgroup/conference/join/invite/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).
memberID empty: invite all group members.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Body

name type Is must default value Remark other information
memberID string Must Member object ID. PUID/user account. Empty: Invite all group members.

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Kick someone from a meeting

Basic Information

Path: /bvcsp/v1/imgroup/conference/kickout/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Body

name type Is must default value Remark other information
memberID string Must Member object ID. PUID/user account

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Name others to speak

Basic Information

Path: /bvcsp/v1/imgroup/conference/speak/appoint/:groupid

Method: POST

Interface description:

Conferences are created on the basis of groups. You need to create a group first and add relevant people to the group (meeting members can only be group members).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
groupid Meeting ID

Body

name type Is must default value Remark other information
memberID string Must Member object ID. PUID/user account

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get default conference

Basic Information

Path: /bvcsp/v1/imgroup/conference/default

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Query

parameter name Is must Example Remark
memberID yes member id
memberType yes Member type, device: PU, user: User

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must
├─ memberID string Must member id
├─ memberType string Must Member type, device: PU, user: User
├─ defaultConfList string[] Must Default meeting list

item type: string

├─ not necessary

Add default meeting

Basic Information

Path: /bvcsp/v1/imgroup/conference/default

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
memberID string Must member id
memberType string Must Member type, device: PU, user: User
defaultConfList string[] Must Default meeting list

item type: string

├─ not necessary

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete default meeting

Basic Information

Path: /bvcsp/v1/imgroup/conference/default

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
memberID string Must member id
memberType string Must Member type, device: PU, user: User
defaultConfList string[] Must Default meeting list

item type: string

├─ not necessary

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

instant messaging

Send newsletter

Basic Information

Path: /bvcsp/v1/im/msg/new

Method: POST

Interface description:

Speaker type: User,PU
Receiver type: User,PU,IMGroup,PUGroup,UserGroup
Message type: text, gps, file, picture, audio, video, confiudio, notify, control, custom
Message content format:
   text,custom: {textMsg:"xxxx"}
   file,picture,audio,video,confaudio:    {fileID:"xxx",fileSize:"121212",fileName:"xxx.jpg",duration:10000}; duration represents the duration of the audio and video file, in milliseconds
   gps: Same as querying the GPS object in the GPS data interface {lat:31.54512, lng:117.54545, height:6521, angle:2154, speed:212, startCount:3}; the units are: degrees, degrees, centimeters, 1/1000 degrees, meters /hour, persons.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
audience string Must Receiver ID

mock: Zhang San

audienceType string Must Receiver type: User/PU/IMGroup/PUGroup/UserGroup

enumerate: User,PU,IMGroup,PUGroup,UserGroup

mock: PU

msgType string Must Message type

mock: text

msgContent string Must Message content: json

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

ID number Must Message ID

Confirm message has been read

Basic Information

Path: /bvcsp/v1/im/msg/markRead

Method: POST

Interface description:

Rule: After msgid is marked as read, messages smaller than msgid are read messages.
Instead of marking it as read frequently (every time a message is received), you can mark the latest received largest message ID as read every once in a while (10 seconds).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
msgid number Must Message ID

mock: 1

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Check my chat history

Basic Information

Path: /bvcsp/v1/im/msg/history

Method: POST

Interface description:

Speaker type: User,PU
Receiver type: User,PU,IMGroup,PUGroup,UserGroup
Message type: text, gps, file, picture, audio, video, confiudio, notify, control, custom
Message content format:
   text,custom: {textMsg:"xxxx"}
   file,picture,audio,video,confaudio:    {fileID:"xxx",fileSize:"121212",fileName:"xxx.jpg",duration:10000}; duration represents the duration of the audio and video file, in milliseconds
   gps: Same as querying the GPS object in the GPS data interface {lat:31.54512, lng:117.54545, height:6521, angle:2154, speed:212, startCount:3}; the units are: degrees, degrees, centimeters, 1/1000 degrees, meters /hour, persons.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ minid number not necessary Message ID range [min,max], 0 is not filtered.

mock: 0

├─ maxid number not necessary Message ID range [min,max], 0 is not filtered.

mock: 0

├─ beginTime number Must Message time range [begin,end]

mock: @time

├─ endTime number Must Message time range [begin,end]

mock: @time

├─ targetID string not necessary Communication object ID (user account/device ID/group ID)

mock: root

├─ targetType string not necessary Communication object type: User/PU/IMGroup/PUGroup/UserGroup

mock: User

├─ match string not necessary Fuzzy matching message content

mock: admin

├─ beenRead number Must Whether the message has been read (1: unread, 2: read, 0: not used as a condition when filtering)

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number not necessary Total number of entries

mock: 1000

data object[] not necessary Member list

item type: object

├─ ID number Must Message ID

mock: 0

├─ speaker string Must Sender ID

mock: admin

├─ speakerType string Must Sender Type: User/PU

mock: User

├─ audience string Must Receiver ID

mock: Zhang San

├─ audienceType string Must Receiver type: User/PU/IMGroup

mock: PU

├─ time number Must Send time

mock: 0

├─ msgType string Must Message type

mock: text

├─ msgContent string Must Message content: json

Advanced query of chat history

Basic Information

Path: /bvcsp/v1/im/msg/search

Method: POST

Interface description:

obj1 cannot be a group.
obj1 is empty, obj2 is empty, query all messages.
obj1 is not empty and obj2 is empty. Query all messages sent by obj1.
obj1 is empty, obj2 is not empty, query all messages received by obj2. obj2 can be a group.
obj1 is not empty, obj2 is not empty, obj1==obj2, query all messages sent and received by obj1.
obj1 is not empty, obj2 is not empty, and obj2 is not a group: query the interactive chat records of obj1 and obj2.
obj1 is not empty, obj2 is not empty, and obj2 is a group: query the message sent by obj1 to obj2.

Speaker type: User,PU
Receiver type: User,PU,IMGroup
Message type: text, gps, file, picture, audio, video, confiudio, notify, control, custom
Message content format:
   text,custom: {textMsg:"xxxx"}
   file,picture,audio,video,confaudio:    {fileID:"xxx",fileSize:"121212",fileName:"xxx.jpg",duration:10000}; duration represents the duration of the audio and video file, in milliseconds
   gps: Same as querying the GPS object in the GPS data interface {lat:31.54512, lng:117.54545, height:6521, angle:2154, speed:212, startCount:3}; the units are: degrees, degrees, centimeters, 1/1000 degrees, meters /hour, persons.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ minid number not necessary Message ID range [min,max], 0 is not filtered.

mock: 0

├─ maxid number not necessary Message ID range [min,max], 0 is not filtered.

mock: 0

├─ beginTime number Must Message time range [begin,end]

mock: @time

├─ endTime number Must Message time range [begin,end]

mock: @time

├─ msgType string not necessary Message type

mock: text

├─ match string not necessary Fuzzy matching message content
├─ beenRead number not necessary Whether the message has been read (1: unread, 2: read, 0: not used as a condition when filtering), read or unread is only valid when specifying a specific object

mock: 0

├─ obj1ID string not necessary Object1ID

mock: admin

├─ obj1Type string not necessary Object 1 type, User/PU

mock: User

├─ obj2ID string not necessary Object2ID

mock: root

├─ obj2Type string not necessary Object 2 type, User/PU/IMGroup

mock: User

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number not necessary Total number of entries

mock: 1000

data object[] not necessary Member list

item type: object

├─ ID number Must Message ID

mock: 0

├─ speaker string Must Sender ID

mock: admin

├─ speakerType string Must Sender Type: User/PU

mock: User

├─ audience string Must Receiver ID

mock: Zhang San

├─ audienceType string Must Receiver type: User/PU/IMGroup

mock: PU

├─ time number Must Send time

mock: 0

├─ msgType string Must Message type

mock: text

├─ msgContent string Must Message content: json

Query read ID

Basic Information

Path: /bvcsp/v1/im/msg/mark

Method: GET

Interface description:

Get the message ID that I have read.

Rule: After msgid is marked as read, messages less than or equal to msgid are read messages. Messages greater than this message ID are unread messages.
Instead of marking it as read frequently (every time a message is received), you can mark the latest received largest message ID as read every once in a while (10 seconds).

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object Must
├─ ID number Must Read message ID

mock: 0

├─ time number Must Message read time, UTC

mock: @timestamp

websocket

Online status subscription

Basic Information

Path: /bvcsp/v1/ws/event/onlinestatus

Method: POST

Interface description:

Websocket connection, you can include token in the header or in the path parameter when connecting. If the token is invalid, the websocket connection cannot be established.
By default, if there is no data transmission for 1 minute, the connection will be closed. The subscriber can send an empty data every 20 seconds to maintain the connection! ! !

terminal type:

type value illustrate
PU Ordinary devices without user information, such as MPU law enforcement cameras.
CU Client users have no device information, for example: users log in to the web client.
UA Device-side users have user and device information, such as MCP.

When notified online, all parameters are valid. When notified offline, only the user and device IDs may be valid.
When receiving an offline notification, only update the device status and do not update other information. For example, channels may be empty.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Sec-WebSocket-Protocol string yes xxxx token

Query

parameter name Is must Example Remark
token no xxxxxx Token information after login. If it is not in the headers, it needs to be there.

Return data

name type Is must default value Remark other information
type string Must terminal type
time number Must state change time
status number Must Current status: 0: Not online; 1: Online.
network object not necessary Internet Information
├─ deviceAddr string not necessary Device address
├─ serverAddr string not necessary server address
├─ TCP1OrUDP2 number not necessary tcp/udp online: 1: tcp 2: udp
├─ protocol string not necessary Protocol: "sip","http","sip28181"
user object not necessary User Info
├─ ID string Must user account

mock: admin

├─ gid string not necessary Group ID

mock: 000000

├─ name string not necessary username

mock: admin

├─ creator string not necessary Creator account

mock: admin

├─ position string not necessary User's job title

mock: System administrator

├─ phone string not necessary telephone number

mock: 12345678910

├─ email string not necessary Mail

mock: xxx@000.com

├─ desc string not necessary describe
device object not necessary Device Information
├─ ID string Must Device ID

mock: PU_0

├─ gid string not necessary Group ID

mock: 000000

├─ name string not necessary Device Name

mock: test

├─ manufacturer string not necessary Manufacturer's name

mock: bv

├─ product string not necessary product name

mock: mpu

├─ softwareVersion string not necessary Software version

mock: 0.0.0

├─ hardwareVersion string not necessary hardware version
├─ classID number not necessary Equipment class
├─ channels object[] not necessary Channel list

item type: object

├─ index number Must Channel number

mock: 0

├─ mediaDir number Must Supported media directions (from the requester's perspective)

enumerate: 1,2,4,8,16,32

Enumeration notes: videoSend, videoRecv, audioSend, audioRecv, dataSend, dataRecv

mock: 10

├─ ptz number Must The PTZ index of the channel. -1 means no gimbal

mock: 0

├─ name string Must Channel name

mock: Front door

├─ gps object not necessary The location reported or set
├─ lng number Must Longitude (WGS84)

mock: 31.52

├─ lat number Must Dimensions (WGS84)

mock: 31.52

├─ time number not necessary
├─ hardware object not necessary hardware information
├─ WIFI number Must Number of WIFIs

mock: 1

├─ radio number Must Number of wireless modules

mock: 1

├─ videoIn number Must Number of video inputs

mock: 1

├─ audioIn number Must Number of audio inputs

mock: 1

├─ audioOut number Must Number of audio outputs

mock: 1

├─ PTZ number Must PTZ Count

mock: 1

├─ serialPort number Must Number of serial ports

mock: 1

├─ alertIn number Must Number of alarm inputs

mock: 1

├─ alertOut number Must Number of alarm outputs

mock: 1

├─ storage number Must Number of storage devices

mock: 1

├─ GPS number Must Number of GPS devices

mock: 1

Alarm event subscription

Basic Information

Path: /bvcsp/v1/ws/event/alarm

Method: POST

Interface description:

Websocket connection, you can include token in the header or in the path parameter when connecting. If the token is invalid, the websocket connection cannot be established.
By default, if there is no data transmission for 1 minute, the connection will be closed. The subscriber can send an empty data every 20 seconds to maintain the connection! ! !

type describe type describe type describe
1 disk error 4102 reserve 4113 The device battery was removed
2 Not enough disk space 4103 Low temperature alarm 4114 Equipment is disassembled
3 Face recognition alarm 4104 High temperature alarm 4115 Device battery is low
4 Alarm when a person falls 4105 Low speed alarm 4116 Enter line alarm
5 SOS emergency call 4106 speed alarm 4117 Offset line alarm
4096 Video lost 4107 Enter area alarm 4118 Take off your hat and call the police
4097 motion detection 4108 Alarm when leaving area 4119 Impact hat alarm
4098 Video occlusion 4109 Low voltage alarm 4120 Near power alarm
4099 Alarm input 4110 High voltage alarm 4121 High altitude alarm
4100 Periodic alarm 4111 Equipment stationary alarm 20480 reserve
4101 reserve 4112 Equipment inverted alarm 20481 reserve

state:

status illustrate
0 Alarm in progress
1 Automatically release
2 Manual release
3 Manually ignored

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Sec-WebSocket-Protocol string yes xxxx token

Query

parameter name Is must Example Remark
token no xxxxxx Token information after login. If it is not in the headers, it needs to be there.

Return data

name type Is must default value Remark other information
key string not necessary Alarm ID
type number Must alarm type

Enumeration notes:

time number Must Alarm occurrence time, UTC
userID string not necessary user account
devID string Must Device ID number
subDevIdx number not necessary Sub-device number
status number Must state
desc string not necessary Alarm description
lat number not necessary Dimensions (WGS84)
lng number not necessary Longitude (WGS84)

Instant messaging subscription

Basic Information

Path: /bvcsp/v1/ws/im

Method: POST

Interface description:

Websocket connection, you can include token in the header or in the path parameter when connecting. If the token is invalid, the websocket connection cannot be established.
The upstream data of this connection is the message sent, and the downstream data is the information distributed by the server.
By default, the connection will be closed if there is no data transmission for 1 minute. The subscriber can send an empty message every 20 seconds to maintain the connection! ! !

js code example

var ws = new WebSocket("ws://localhost/bvcsp/v1/ws/im",[token]);

go backend

var upgrader = websocket.Upgrader{
        Subprotocols: []string{r.Header.Get("Sec-WebSocket-Protocol")},
}

Speaker type: User,PU
Receiver type: User,PU,IMGroup
Message type: text, gps, file, picture, audio, video, confiudio, notify, control, custom
Message content format:
   text,custom: {textMsg:"xxxx"}
   file,picture,audio,video,confaudio:    {fileID:"xxx",fileSize:"121212",fileName:"xxx.jpg",duration:10000}; duration represents the duration of the audio and video file, in milliseconds
   gps: Same as querying the GPS object in the GPS data interface {lat:31.54512, lng:117.54545, height:6521, angle:2154, speed:212, startCount:3}; the units are: degrees, degrees, centimeters, 1/1000 degrees, meters /hour, persons.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Sec-WebSocket-Protocol string yes xxxx token

Query

parameter name Is must Example Remark
token yes xxxxxx Token information after login. If it is not in the headers, it needs to be there.

Body

name type Is must default value Remark other information
audience string Must Receiver (user, device, cluster) ID

mock: root

audienceType string Must User, PU, IMGroup

mock: User

msgType string Must Message type, refer to Query History Message Interface

mock: text

msgContent string Must For message content, please refer to Query History Message Interface

mock: {textMsg:"xxxxxx"}

Return data

name type Is must default value Remark other information
ID number Must Message ID

mock: 0

speaker string Must Sender ID

mock: admin

speakerType string Must Sender Type: User/PU

mock: User

speakerName string Must Sender name
audience string Must Receiver ID

mock: Zhang San

audienceType string Must Receiver type: User/PU/IMGroup

mock: PU

time number Must Send time

mock: 0

msgType string Must Message type

mock: text

msgContent string Must Message content: json

Device location subscription

Basic Information

Path: /bvcsp/v1/ws/gpsdata

Method: POST

Interface description:

Websocket connection, you can include token in the header or in the path parameter when connecting. If the token is invalid, the websocket connection cannot be established.
The upstream data of this connection is the message sent, and the downstream data is the information distributed by the server.
By default, the connection will be closed if there is no data transmission for 1 minute. The subscriber can send an empty message every 20 seconds to maintain the connection! ! !

js code example

var ws = new WebSocket("ws://localhost/bvcsp/v1/ws/gpsdata",[token]);

go backend

var upgrader = websocket.Upgrader{
        Subprotocols: []string{r.Header.Get("Sec-WebSocket-Protocol")},
}

When all is true, subscribe to the real-time location of all devices that the current token has permissions, without adding/deleting device ID numbers.

Signal source:

value Signal source
1 US GPS
2 China Beidou
4 GLONASS, RUSSIA
8 European Galileo
16 Japanese quasi-zenith
32 uwb positioning
64 Base station positioning
128 Bluetooth positioning

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Sec-WebSocket-Protocol string yes xxxx token

Query

parameter name Is must Example Remark
token yes xxxxxx Token information after login. If it is not in the headers, it needs to be there.

Body

name type Is must default value Remark other information
all boolean not necessary Whether to subscribe to all online device locations
badd boolean not necessary Whether to add subscription devices
puid string[] not necessary Device ID list

item type: string

├─ not necessary Device ID

Return data

name type Is must default value Remark other information
devId string Must Device ID
lng number Must Longitude (WGS84)

mock: 31.52

lat number Must Latitude (WGS84)

mock: 31.52

time number Must Positioning time (UTC)

mock: @timestamp

height number Must Height, unit 1/100 meter

mock: 0

angle number Must Direction angle (north is the origin, clockwise is positive), unit 1/1000 degree

mock: 0

speed number Must Speed(m/h)

mock: 0

starCount number Must Number of positioning stars, if <= 0, it is not satellite positioning.

mock: 4

state number Must Positioning status (1-positioned, 0-not positioned)

mock: 1

satellite number Must Signal source

enumerate: 1,2,4,8,16

Enumeration notes: American GPS, Chinese Beidou, Russian GLONASS, European Galileo, Japanese Quasi-Zenith

mock: 2

Meeting event subscription

Basic Information

Path: /bvcsp/v1/ws/event/conference

Method: POST

Interface description:

Websocket connection, you can include token in the header or in the path parameter when connecting. If the token is invalid, the websocket connection cannot be established.
The upstream data of this connection is empty, and the downstream data is the conference event information distributed by the server.
By default, the connection will be closed if there is no data transmission for 1 minute. The subscriber can send an empty alarm event every 20 seconds to maintain the connection! ! !

event type: "conference" / "member" / "group" / "group-member"
conference: conference event, conference status changes, load confInfo is valid.
member: conference member event, member status changes, the load member is valid, and an empty field indicates no change. ~~~~
group: Group event, the group is created, deleted, modified, and the load confInfo is valid.
group-member: Group member event, the member status changes, the load member is valid, the status is based on the conference member event.
Operation type: "add" / "del" / "mod" / "start-speak" / "end-speak" respectively corresponds to: "add object", "delete object", "modify object", "start speaking", " Concluding remarks".

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Sec-WebSocket-Protocol string yes xxxx token

Query

parameter name Is must Example Remark
token yes xxxxxx Token information after login. If it is not in the headers, it needs to be there.

Return data

name type Is must default value Remark other information
type string Must event type

enumerate: conference,member,group,group-member

operation string Must Operation type

enumerate: add,del,mod,start-speak,end-speak

Enumeration notes: add: add del:delete mod:modify start-speak: start speaking end-speak: end the speech

groupid string Must Group ID
confInfo object not necessary Conference status
├─ mode number not necessary Conference mode
member object not necessary member status
├─ ID integer Must Member ID
├─ memberID string Must Member object ID: device ID/user ID
├─ memberType string Must "PU"/"User"
├─ defaultConf boolean not necessary Is it the default conference?
├─ status number Must Status: 0: Offline; 1: Joining; 2: Already joined. 3: Speaking.
├─ deviceId string not necessary Online Device ID(PU or UA)
├─ memberName string Must Device/User Name
├─ name string not necessary Group nickname
├─ current boolean not necessary Is it the current login instance?

Command interactive subscription

Basic Information

Path: /bvcsp/v1/ws/command

Method: POST

Interface description:

When subscribing to commands issued by the platform, the id needs to correspond to the received command when replying to the command, and the reply must be made within timeout (milliseconds), otherwise the backend will determine it as a timeout failure.
For the data data structure, see the separate command documentation. Contact sales or technical support to obtain it.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Sec-WebSocket-Protocol string yes token

Query

parameter name Is must Example Remark
token no Token information after login. If it is not in the headers, it needs to be there.

Body

name type Is must default value Remark other information
ID string Must Command ID, unique identifier
method string Must Methods: get, post, put, delete

mock: get

command string Must Command: See detailed documentation

enumerate: conf_join,open_dialog

Enumeration notes: conf_join join conference open_dialog open video

mock: opendialog

timeout number Must 30000 Timeout, milliseconds
page number not necessary Pagination, starting from scratch

mock: 0

pageSize number not necessary Paging Size

mock: 20

data object not necessary Command payload: see detailed documentation

Return data

name type Is must default value Remark other information
ID string Must Command ID, corresponding to the received command

mock: 1

code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination information, optional, see documentation
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object not necessary Reply payload: see detailed documentation

historical data

Platform file retrieval

Basic Information

Path: /bvcsp/v1/recordfile/filter

Method: POST

Interface description:

filetype: fileType:
"video" // video file
"audio" // audio file
"image"    // Pictures
"gps" // GPS file
"log" // log file
"firmware" // firmware file

recordReason Recording reason:
"manual" // Manual storage
"time" // timed storage
"alarm" // Alarm storage (according to the configuration of alarm linkage)
"auto" // Automatic storage (according to automatic storage configuration)
"upload" //Uploaded files (files uploaded by the terminal to the platform)
"download" //Downloaded file (file downloaded by the platform from the terminal)
"call" // Audio and video call file

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch
pageSize number Must Paging Size
filter object Must filter conditions
├─ beginTime number not necessary Start time, Unix timestamp, accurate to seconds
├─ endTime number not necessary End time, Unix timestamp, accurate to seconds
├─ puID string not necessary device id
├─ userID string not necessary user id
├─ fileType string[] not necessary file type

item type: string

├─ not necessary
├─ recordReason string[] not necessary Reason for video recording

item type: string

├─ not necessary
├─ desc1 string not necessary Description 1 Exact search
├─ desc2 string not necessary Description 2 Fuzzy matching
├─ match string not necessary Fuzzy matching, including puID, userID, file name
├─ mark boolean not necessary Whether to highlight the file
├─ insertBeginTime number not necessary Upload time - range [, Unix timestamp, accurate to seconds
├─ insertEndTime number not necessary upload time - range], Unix timestamp, accurate to seconds

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must wrong description
pageInfo object not necessary Paginated results information
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number not necessary Total number of entries

mock: 1000

data object[] not necessary Datasheets

item type: object

├─ ID number Must
├─ fileID string Must File ID, generated by NRU
├─ nruID string Must NRU where the file is located
├─ puID string Must Video source device ID
├─ puName string not necessary Device Name
├─ userID string not necessary Video source user account
├─ userName string not necessary user name
├─ channelIndex number not necessary Video source channel number
├─ filePath string Must Store full path
├─ fileType string Must file type

enumerate: video,audio,image,gps,log,firmware

├─ fileSize number Must File size (unit byte)
├─ fileHash string not necessary File hash (sha256, md5, md5 recommended)
├─ beginTime number Must Recording file start time, Unix timestamp, accurate to seconds
├─ endTime number not necessary End time of video file, Unix timestamp, accurate to seconds
├─ insertTime number Must File storage time, Unix timestamp, accurate to seconds
├─ recordReason string not necessary Reason for video recording

enumerate: manual,time,alarm,auto,upload,download,call

├─ desc1 string not necessary Description 1 Exact search
├─ desc2 string not necessary Description 2 Fuzzy matching
├─ fileName string Must File Name
├─ lat number not necessary Latitude: North latitude is a positive value, South latitude is a negative value, unit: degrees
├─ lng number not necessary Longitude: east longitude is a positive value, west longitude is a negative value, unit: degree
├─ mark boolean Must Whether to highlight the file

Get video file information

Basic Information

Path: /bvcsp/v1/recordfile/:fileid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
fileid Platform file fileid

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must wrong description
data object not necessary File information
├─ ID number Must
├─ fileID string Must File ID, generated by NRU
├─ nruID string Must NRU where the file is located
├─ puID string Must Video source device ID
├─ puName string not necessary Device Name
├─ userID string not necessary Video source user account
├─ userName string not necessary user name
├─ channelIndex number not necessary Video source channel number
├─ filePath string Must Store full path
├─ fileType string Must file type

enumerate: video,audio,image,gps,log,firmware

├─ fileSize number Must File size (unit byte)
├─ fileHash string not necessary File hash (sha256, md5, md5 recommended)
├─ beginTime number Must Recording file start time, Unix timestamp, accurate to seconds
├─ endTime number not necessary End time of video file, Unix timestamp, accurate to seconds
├─ insertTime number Must File storage time, Unix timestamp, accurate to seconds
├─ recordReason string not necessary Reason for video recording

enumerate: manual,time,alarm,auto,upload,download,call

├─ desc1 string not necessary Description 1 Exact search
├─ desc2 string not necessary Description 2 Fuzzy matching
├─ fileName string Must File Name
├─ lat number not necessary Latitude: North latitude is a positive value, South latitude is a negative value, unit: degrees
├─ lng number not necessary Longitude: east longitude is a positive value, west longitude is a negative value, unit: degree
├─ mark boolean Must Whether to highlight the file

Modify video file information

Basic Information

Path: /bvcsp/v1/recordfile/{fileid}

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
fileid

Body

name type Is must default value Remark other information
desc1 string not necessary Description 1
desc2 string not necessary Description 2
mark boolean not necessary Whether to highlight the file

Return data

name type Is must default value Remark other information
code number Must
msg string Must

Handle alarm

Basic Information

Path: /bvcsp/v1/alarm/process/:key

Method: POST

Interface description:

Alarm type definition: See the websocket chapter of this document -> Alarm event subscription interface description.
Special note: Equipment online and offline and user online and offline (alarm) are not recorded in the alarm record. Please check accordingly: device online and offline logs, user online and offline logs! ! !
status: 0: Alarm in progress, 1: Automatically released, 2: Manually released, 3: Manually ignored.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
key Alarm ID

Body

name type Is must default value Remark other information
status integer not necessary 0: Alarm in progress, 1: Automatically released, 2: Manually released, 3: Manually ignored.
lat number not necessary latitude unit degree
lng number not necessary longitude unit degree
desc string not necessary Alarm description
process_desc string not necessary Processing Instructions

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

alarm record

Basic Information

Path: /bvcsp/v1/alarm

Method: POST

Interface description:

Alarm type definition: See the websocket chapter of this document -> Alarm event subscription interface description.
Special note: Equipment online and offline and user online and offline (alarm) are not recorded in the alarm record. Please check accordingly: device online and offline logs, user online and offline logs! ! !
status: 0: Alarm in progress, 1: Automatically released, 2: Manually released, 3: Manually ignored.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
page integer Must
pageSize integer Must
filter object not necessary
├─ device_id string not necessary Alarm device ID number
├─ sub_device_index integer not necessary Sub-device number
├─ timestamp_min integer not necessary Alarm timestamp, time range[
├─ timestamp_max integer not necessary Alarm timestamp, time range]
├─ user_id string not necessary Alarm user account
├─ type integer not necessary alarm type
├─ status number [] not necessary state collection

item type: number

├─ not necessary state collection
├─ desc string not necessary Alarm description
├─ operator_id string not necessary Processor ID
├─ process_time_min integer not necessary Process timestamp, time range[
├─ process_time_max integer not necessary Process timestamp, time range]
├─ match string not necessary Fuzzy matching desc, process_desc, device_id, user_id

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ key string not necessary Unique ID
├─ type integer not necessary alarm type
├─ status integer not necessary 0: Alarm in progress, 1: Automatically released, 2: Manually released, 3: Manually ignored.
├─ timestamp integer not necessary Alarm occurrence time, UTC
├─ device_id string not necessary Device ID number
├─ lat number not necessary Latitude: North latitude is a positive value, South latitude is a negative value, unit: degrees
├─ lng number not necessary Longitude: east longitude is a positive value, west longitude is a negative value, unit: degree
├─ desc string not necessary Alarm description
├─ sub_device_index integer not necessary Sub-device number
├─ user_id string not necessary Alarm user account
├─ user_name string not necessary Alarm user name
├─ value integer not necessary Parameters (not used)
├─ operator_id string not necessary Processor ID
├─ operator_name string not necessary Processor name
├─ process_desc string not necessary Processing Instructions
├─ process_time integer not necessary processing time

Device GPS track

Basic Information

Path: /bvcsp/v1/pu/history/gps

Method: POST

Interface description:

Signal source:

value Signal source
1 US GPS
2 China Beidou
4 GLONASS, RUSSIA
8 European Galileo
16 Japanese quasi-zenith
32 uwb positioning
64 Base station positioning
128 Bluetooth positioning

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
filter object Must
├─ device_id string Must device id
├─ timestamp_max integer not necessary Timestamp, trajectory time range unit: seconds
├─ timestamp_min integer not necessary Timestamp, trajectory time range unit: seconds
page integer Must
pageSize integer Must

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ angle integer not necessary Direction angle (north is the origin, clockwise is positive), unit 1/1,000°
├─ devId string not necessary DeviceId
├─ height integer not necessary Height, unit 1/100 meter
├─ ID integer not necessary key id
├─ lat integer not necessary Latitude (WGS84), unit: degrees
├─ lng integer not necessary Longitude (WGS84), unit: degrees
├─ satellite integer not necessary Signal source
├─ speed integer not necessary Speed, unit meters/hour
├─ starCount integer not necessary Number of positioning stars, if <=0, it is non-satellite positioning
├─ state integer not necessary Positioning status (1-positioned, 0-not positioned)
├─ time integer not necessary Timestamp, in seconds

Device file retrieval

Basic Information

Path: /bvcsp/v1/pu/recordfile/filter/:puid

Method: POST

Interface description:

filetype: fileType:
"video" // video file
"audio" // audio file
"image"    // Pictures
"gps" // GPS file
"log" // log file
"firmware" // firmware file

recordReason Recording reason:
"manual" // Manual storage
"time" // timed storage
"alarm" // Alarm storage (according to the configuration of alarm linkage)
"auto" // Automatic storage (according to automatic storage configuration)
"upload" //Uploaded files (files uploaded by the terminal to the platform)
"download" //Downloaded file (file downloaded by the platform from the terminal)
"call" // Audio and video call file

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch
pageSize number Must Paging Size
filter object Must filter conditions
├─ beginTime number Must Start time, Unix timestamp, accurate to seconds
├─ endTime number Must End time, Unix timestamp, accurate to seconds
├─ puID string Must Device ID
├─ userID string not necessary User ID
├─ fileType string[] not necessary file type

item type: string

├─ not necessary
├─ recordReason string[] not necessary Reason for video recording

item type: string

├─ not necessary
├─ channelIndex number not necessary Channel number, -1: not used as index condition
├─ desc1 string not necessary Description 1 Exact search
├─ desc2 string not necessary Description 2 Fuzzy matching
├─ match string not necessary Fuzzy matching, including puID, userID, file name

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must wrong description
pageInfo object not necessary Paginated results information
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number not necessary Total number of entries

mock: 1000

data object[] not necessary Datasheets

item type: object

├─ fileID string Must file id
├─ channelIndex number Must Video source channel number
├─ filePath string Must Store full path
├─ fileType string Must file type

enumerate: video,audio,image,gps,log,firmware

├─ fileSize number Must File size (unit byte)
├─ beginTime number Must Recording file start time, Unix timestamp, accurate to seconds
├─ endTime number Must End time of video file, Unix timestamp, accurate to seconds
├─ insertTime number not necessary File storage time, Unix timestamp, accurate to seconds
├─ recordReason string not necessary Reason for video recording

enumerate: manual,time,alarm,auto,upload,download,call

├─ desc1 string not necessary Description 1 Exact search
├─ desc2 string not necessary Description 2 Fuzzy matching
├─ lat number not necessary Latitude: North latitude is a positive value, South latitude is a negative value, unit: degrees
├─ lng number not necessary Longitude: east longitude is a positive value, west longitude is a negative value, unit: degree

Download device files

Basic Information

Path: /bvcsp/v1/pu/download/:puid/:fileid

Method: GET

Interface description:

First retrieve the device-side file and get the file ID.
Audio and video file thumbnail display + playback using the current interface, please refer to the demo for details:https://gitee.com/besovideo/ewebdemo.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id
fileid file id

Delete device files

Basic Information

Path: /bvcsp/v1/pu/recordfile/:puid/:fileid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid Device ID
fileid File ID

Return data

name type Is must default value Remark other information
code number Must
msg string Must

Device online/offline logs

Basic Information

Path: /bvcsp/v1/pu/log/online

Method: POST

Interface description:

reason: timeout, disconnect, relogin, unregister, kickout, delete, overload, servererror
protocol: sip, http, websocket,

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
filter object not necessary
├─ device_id string not necessary Device id, supports fuzzy query
├─ host string not necessary Online host, supports fuzzy query
├─ protocol string not necessary Online agreement
├─ reason string not necessary Online/offline reasons, support fuzzy query
├─ timestamp_max integer Must Timestamp, online/offline time range]
├─ timestamp_min integer Must Timestamp, online/offline time range[
page integer Must
pageSize integer Must

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ device_id string not necessary pu id
├─ host string not necessary Device online address
├─ ID integer not necessary key id
├─ offline_timestamp integer not necessary Device offline timestamp
├─ online_timestamp integer not necessary Device online timestamp
├─ protocol string not necessary sip, http, websocket...
├─ reason string not necessary Empty: not offline, online: online
├─ device_name string not necessary Device Name

User online/offline logs

Basic Information

Path: /bvcsp/v1/user/log/online

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
filter object not necessary
├─ device_id string not necessary Device id, supports fuzzy query
├─ host string not necessary Online host, supports fuzzy query
├─ protocol string not necessary Online agreement
├─ reason string not necessary Online/offline reasons, support fuzzy query
├─ timestamp_max integer Must Timestamp, online/offline time range]
├─ timestamp_min integer Must Timestamp, online/offline time range[
├─ user_id string not necessary user id
page integer Must
pageSize integer Must

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ device_id string not necessary pu id
├─ host string not necessary Device online address
├─ ID integer not necessary key id
├─ offline_timestamp integer not necessary Device offline timestamp,
├─ online_timestamp integer not necessary Device online timestamp
├─ protocol string not necessary sip, http, websocket...
├─ reason string not necessary Empty: not offline, online: online
├─ user_id string not necessary user id
├─ user_name string not necessary user name
├─ device_name string not necessary Device Name

Device online/offline logs (extend)

Basic Information

Path: /bvcsp/v1/pu/log/onlineEx

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
filter object not necessary
├─ device_id string not necessary Device id, supports fuzzy query
├─ host string not necessary Online host, supports fuzzy query
├─ offline_timestamp_max integer Must Timestamp, offline time range]
├─ offline_timestamp_min integer Must Timestamp, offline time range[
├─ online_timestamp_max integer Must timestamp, online time range]
├─ online_timestamp_min integer Must Timestamp, online time range[
├─ protocol string not necessary Online agreement
├─ reason string not necessary Online/offline reasons, support fuzzy query
page integer Must
pageSize integer Must

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ device_id string not necessary pu id
├─ host string not necessary Device online address
├─ ID integer not necessary key id
├─ offline_timestamp integer not necessary Device offline timestamp
├─ online_timestamp integer not necessary Device online timestamp
├─ protocol string not necessary sip, http, websocket...
├─ reason string not necessary Empty: not offline, online: online
├─ device_name string not necessary Device Name

User online/offline logs (extend)

Basic Information

Path: /bvcsp/v1/user/log/onlineEx

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
filter object not necessary
├─ device_id string not necessary Device id, supports fuzzy query
├─ host string not necessary Online host, supports fuzzy query
├─ offline_timestamp_max integer Must Timestamp, offline time range]
├─ offline_timestamp_min integer Must Timestamp, offline time range[
├─ online_timestamp_max integer Must timestamp, online time range]
├─ online_timestamp_min integer Must Timestamp, online time range[
├─ protocol string not necessary Online agreement
├─ reason string not necessary Online/offline reasons, support fuzzy query
├─ user_id string not necessary user id
page integer Must
pageSize integer Must

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ device_id string not necessary pu id
├─ host string not necessary Device online address
├─ ID integer not necessary key id
├─ offline_timestamp integer not necessary Device offline timestamp
├─ online_timestamp integer not necessary Device online timestamp
├─ protocol string not necessary sip, http, websocket...
├─ reason string not necessary Empty: not offline, online: online
├─ user_id string not necessary user id

Operation log

Basic Information

Path: /bvcsp/v1/operate/log

Method: POST

Interface description:

operatorType type:
    "User" : User
    "PU" : device
    "Service": service

targetType type:
    "User" : User
    "UserGroup" : UserGroup
    "Password" : password
    "UserResource" : User resource
    "Role" : role
    "RoleResource" : role resource
    "PUGroup" : device group
    "PU" : device
    "PUChannel" : device channel
    "BWList" : black and white list
    "IMGroup" : Instant messaging group
    "IMGroupMember" : Group members
    "ContactSetTop" : Contact at the top
    "App" : module program
    "PlatFence" : Platform electronic fence
    "PlatFencePU" : Platform electronic fence equipment
    "PlanDownload" : Download plan
    "PlanRefPU" : Plan device
    "PlanRecord" : recording plan
    "File": file
    "Service": service

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch
pageSize number Must Paging Size
filter object Must title
├─ beginTime number Must Start time, Unix timestamp, accurate to seconds
├─ endTime number Must End time, Unix timestamp, accurate to seconds
├─ operate string not necessary Operations, add, del, mod
├─ targetType string not necessary target type
├─ targetID string not necessary target id
├─ operatorType string not necessary Operator type, User, PU
├─ operatorID string not necessary operator id
├─ ip string not necessary IP address
├─ match string Must Fuzzy matching operation content

Return data

name type Is must default value Remark other information
code number Must error code
msg string Must wrong description
pageInfo object not necessary Paginated results information
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number not necessary Total number of entries

mock: 1000

data object[] not necessary Datasheets

item type: object

├─ ID number Must
├─ operate string Must Operations, add, del, mod
├─ targetType string Must target type
├─ targetID string Must target id
├─ content string not necessary Operation content
├─ operatorType string Must Operator type
├─ operatorID string Must operator id
├─ time number Must Operation time, Unix timestamp, accurate to seconds
├─ ip string Must IP address
├─ result number Must Operation result
├─ message string Must Operation result description

System alarm record

Basic Information

Path: /bvcsp/v1/system/warn/list

Method: POST

Interface description:

Type definition:

value illustrate
online_failed Failed to go online

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
page integer Must
pageSize integer Must
filter object not necessary
├─ type string not necessary type
├─ match string not necessary fuzzy matching
├─ time_min integer not necessary Process timestamp, time range[
├─ time_max integer not necessary Process timestamp, time range]

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ key string Must Unique ID
├─ type string Must type
├─ time integer Must Alarm occurrence time, UTC
├─ object_id string not necessary Object ID
├─ object_type string not necessary Object type
├─ object_name string not necessary object name
├─ desc string not necessary Alarm description

electric fence

Modify platform fence

Basic Information

Path: /bvcsp/v1/platffence/:id

Method: PUT

Interface description:

Permission required.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
ID Fence ID

Body

name type Is must default value Remark other information
name string not necessary name
desc string not necessary describe
status number not necessary Enable status 1: enabled; 2: disabled
actionType number not necessary Fence behavior 1: No leaving; 2: No entry
fenceType number not necessary Fence Type 1: Circle, 2: Polygon
radius number not necessary Radius, valid when type is "circle", unit: cm
coords object[] not necessary Coordinate set, valid when the type is "polygon", supports up to 10

item type: object

├─ lat number Must latitude
├─ lng number Must longitude
alarmTimes object[] not necessary Daily alarm time period, supports up to 6

item type: object

├─ hourBegin number Must start hour
├─ minuteBegin number Must starting minute
├─ secondBegin number Must Starting seconds
├─ hourEnd number Must end hour
├─ minuteEnd number Must end minute
├─ secondEnd number Must end seconds

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object not necessary group information
├─ ID string Must ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ status number not necessary Enable status 1: enabled; 2: disabled
├─ actionType number not necessary Fence behavior 1: No leaving; 2: No entry
├─ fenceType number not necessary Fence Type 1: Circle, 2: Polygon
├─ radius number not necessary Radius, valid when type is "circle", unit: cm
├─ coords object[] not necessary Coordinate set, valid when the type is "polygon", supports up to 10

item type: object

├─ lat number Must latitude
├─ lng number Must longitude
├─ alarmTimes object[] not necessary Daily alarm time period, supports up to 6

item type: object

├─ hourBegin number Must start hour
├─ minuteBegin number Must starting minute
├─ secondBegin number Must Starting seconds
├─ hourEnd number Must end hour
├─ minuteEnd number Must end minute
├─ secondEnd number Must end seconds

Create a platform fence

Basic Information

Path: /bvcsp/v1/platffence/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
name string Must name
desc string not necessary describe
status number not necessary Enable status 1: enabled; 2: disabled
actionType number not necessary Fence behavior 1: No leaving; 2: No entry
fenceType number not necessary Fence Type 1: Circle, 2: Polygon
radius number not necessary Radius, valid when type is "circle", unit: cm
coords object[] not necessary Coordinate set, valid when the type is "polygon", supports up to 10

item type: object

├─ lat number Must Latitude, wgs84
├─ lng number Must Longitude, wgs84
alarmTimes object[] not necessary Daily alarm time period, supports up to 6

item type: object

├─ hourBegin number Must start hour
├─ minuteBegin number Must starting minute
├─ secondBegin number Must Starting seconds
├─ hourEnd number Must end hour
├─ minuteEnd number Must end minute
├─ secondEnd number Must end seconds

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object not necessary group information
├─ ID string Must ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ status number not necessary Enable status 1: enabled; 2: disabled
├─ actionType number not necessary Fence behavior 1: No leaving; 2: No entry
├─ fenceType number not necessary Fence Type 1: Circle, 2: Polygon
├─ radius number not necessary Radius, valid when type is "circle", unit: cm
├─ coords object[] not necessary Coordinate set, valid when the type is "polygon", supports up to 10

item type: object

├─ lat number Must latitude
├─ lng number Must longitude
├─ alarmTimes object[] not necessary Daily alarm time period, supports up to 6

item type: object

├─ hourBegin number Must start hour
├─ minuteBegin number Must starting minute
├─ secondBegin number Must Starting seconds
├─ hourEnd number Must end hour
├─ minuteEnd number Must end minute
├─ secondEnd number Must end seconds

Delete fence device

Basic Information

Path: /bvcsp/v1/platffence/device/del/:id

Method: POST

Interface description:

Permission required.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Fence ID

Body

name type Is must default value Remark other information
puidlist string[] Must Array of added device IDs

item type: string

├─ not necessary Device ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Remove platform fence

Basic Information

Path: /bvcsp/v1/platffence/:id

Method: DELETE

Interface description:

Permission required.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
ID Fence ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Add fence equipment

Basic Information

Path: /bvcsp/v1/platffence/device/add/:id

Method: POST

Interface description:

Permission required.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Fence ID

Body

name type Is must default value Remark other information
puidlist string[] Must Array of added device IDs

item type: string

├─ not necessary Device ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Get fence information

Basic Information

Path: /bvcsp/v1/platffence/info/:id

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Fence ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary information
├─ ID string Must ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ status number not necessary Enable status 1: enabled; 2: disabled
├─ actionType number not necessary Fence behavior 1: No leaving; 2: No entry
├─ fenceType number not necessary Fence Type 1: Circle, 2: Polygon
├─ radius number not necessary Radius, valid when type is "circle", unit: cm
├─ coords object[] not necessary Coordinate set, valid when the type is "polygon", supports up to 10

item type: object

├─ lat number Must Latitude, wgs84
├─ lng number Must Longitude, wgs84
├─ alarmTimes object[] not necessary Daily alarm time period, supports up to 6

item type: object

├─ hourBegin number Must start hour
├─ minuteBegin number Must starting minute
├─ secondBegin number Must Starting seconds
├─ hourEnd number Must end hour
├─ minuteEnd number Must end minute
├─ secondEnd number Must end seconds

Get list of fences

Basic Information

Path: /bvcsp/v1/platffence/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy match ID/name/description
├─ status number not necessary 0: All, 1: Enable, 2: Disable
├─ includePuId string not necessary Filter based on whether it contains a certain device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary group list

item type: object

├─ ID string Must ID

mock: 000000

├─ name string Must name
├─ desc string not necessary describe
├─ creator string not necessary Creator ID

mock: admin

├─ createTime number not necessary creation time

mock: @timestamp

├─ status number not necessary Enable status 1: enabled; 2: disabled
├─ actionType number not necessary Fence behavior 1: No leaving; 2: No entry
├─ fenceType number not necessary Fence Type 1: Circle, 2: Polygon
├─ radius number not necessary Radius, valid when type is "circle", unit: cm
├─ coords object[] not necessary Coordinate set, valid when the type is "polygon", supports up to 10

item type: object

├─ lat number Must Latitude, wgs84
├─ lng number Must Longitude, wgs84
├─ alarmTimes object[] not necessary Daily alarm time period, supports up to 6

item type: object

├─ hourBegin number Must start hour
├─ minuteBegin number Must starting minute
├─ secondBegin number Must Starting seconds
├─ hourEnd number Must end hour
├─ minuteEnd number Must end minute
├─ secondEnd number Must end seconds

Get a list of fence equipment

Basic Information

Path: /bvcsp/v1/platffence/device/list/:id

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Fence ID

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy match, device ID/name

mock: admin

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary Member list

item type: object

├─ ID string Must Device ID
├─ name string not necessary Device Name

mock: Zhang San

Video file timeline

add

Basic Information

Path: /bvcsp/v1/recordfile/timeline/{fileid}

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

path parameters

parameter name Example Remark
fileid NRU file ID

Body

name type Is must default value Remark other information
timeLines object[] Must

item type: object

├─ time integer Must Event time, relative to file, in milliseconds

mock: @timestamp

├─ data string Must event description

mock: @title

Return data

name type Is must default value Remark other information
code number Must
msg string Must

delete

Basic Information

Path: /bvcsp/v1/recordfile/timeline/{fileid}

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

path parameters

parameter name Example Remark
fileid NRU video file ID

Body

name type Is must default value Remark other information
idList integer[] Must Video file timeline KeyId list

item type: integer

├─ not necessary

Return data

name type Is must default value Remark other information
code integer Must
msg string Must

Inquire

Basic Information

Path: /bvcsp/v1/recordfile/timeline/filter

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

Body

name type Is must default value Remark other information
page integer Must 0

mock: 0

pageSize integer Must 20

Minimum value: 1

mock: 20

filter object not necessary
├─ fileId string not necessary file id
├─ timeBegin integer not necessary Event time, relative to the file, in milliseconds begin
├─ timeEnd integer not necessary Event time, relative to the file, in milliseconds end
├─ timestampBegin integer not necessary Event timestamp, in seconds (calculated based on the "start time" and "event time" of the file) begin
├─ timestampEnd integer not necessary Event timestamp, in seconds (calculated based on the "start time" and "event time" of the file) end
├─ field_20 integer not necessary Event time, relative to the file, in milliseconds begin
├─ field_21 integer not necessary Event time, relative to the file, in milliseconds end
├─ userId string not necessary Event source user account

Return data

name type Is must default value Remark other information
code integer Must
msg string Must
pageInfo object not necessary
├─ page integer Must
├─ pageSize integer Must
├─ totalCount integer Must
data object[] not necessary

item type: object

├─ fileId string Must file id
├─ userId string Must Event source user account
├─ time string Must Event time, relative to file, in milliseconds
├─ timestamp string Must Event timestamp, in seconds (calculated based on the "start time" and "event time" of the file)
├─ ID string Must primary key Timeline unique identifier
├─ addTime string Must Add timestamp in seconds
├─ data string Must event description

Platform Storage (Download) Plan

Download plan--Add

Basic Information

Path: /bvcsp/v1/plan/download

Method: POST

Interface description:

Add download plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
name string not necessary Download plan name
beginTime integer not necessary Download plan start time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
endTime integer not necessary Download plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
enable boolean not necessary Enable
desc string not necessary Remark
fileTypeList string[] not necessary Download file type list ["video", "audio", "image"]

item type: string

├─ not necessary
onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Download device device files

item type: string

├─ not necessary
time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
fileTsMin number not necessary File start time, timestamp (in seconds)
fileTsMax number not necessary File end time, timestamp (in seconds)

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
data object not necessary
├─ uid string not necessary Download plan UID
├─ name string not necessary Download plan name
├─ beginTime integer not necessary Download plan start time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ endTime integer not necessary Download plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ enable boolean not necessary Enable
├─ desc string not necessary Remark
├─ fileTypeList string[] not necessary Download file type list ["video", "audio", "image"]

item type: string

├─ not necessary
├─ onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Download device device files

item type: string

├─ not necessary
├─ time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
├─ ID integer not necessary neglect
├─ fileTsMin number not necessary File start time, timestamp (in seconds)
├─ fileTsMax string not necessary File end time, timestamp (in seconds)

Download plan--get

Basic Information

Path: /bvcsp/v1/plan/download/:uid

Method: GET

Interface description:

Get a download plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid Download plan UID

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
data object not necessary
├─ uid string not necessary Download plan UID
├─ name string not necessary Download plan name
├─ beginTime integer not necessary Download plan start time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ endTime integer not necessary Download plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ enable boolean not necessary Enable
├─ desc string not necessary Remark
├─ fileTypeList string[] not necessary Download file type list ["video", "audio", "image"]

item type: string

├─ not necessary
├─ onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Download device device files

item type: string

├─ not necessary
├─ time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
├─ ID integer not necessary neglect
├─ fileTsMin number not necessary File start time, timestamp (in seconds)
├─ fileTsMax number not necessary File end time, timestamp (in seconds)

Download plan--Modify

Basic Information

Path: /bvcsp/v1/plan/download/:uid

Method: PUT

Interface description:

Modify download plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid Download plan UID

Body

name type Is must default value Remark other information
name string not necessary Download plan name
beginTime integer not necessary Download plan start time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
endTime integer not necessary Download plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
enable boolean not necessary Enable
desc string not necessary Remark
fileTypeList string[] not necessary Download file type list ["video", "audio", "image"]

item type: string

├─ not necessary
onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Download device device files

item type: string

├─ not necessary
time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
fileTsMin number not necessary File start time, timestamp (in seconds)
fileTsMax number not necessary File end time, timestamp (in seconds)

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Download plan--query

Basic Information

Path: /bvcsp/v1/plan/download/query

Method: POST

Interface description:

Inquire

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
page integer not necessary Pagination, first page: 0, second page: 1, third page: 2...
pageSize integer not necessary Pagination size > 0
filter object not necessary
├─ desc string not necessary Remark
├─ enable boolean not necessary Is enable
├─ name string not necessary name
├─ uid string not necessary Download plan UID

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ uid string not necessary Download plan UID
├─ name string not necessary Download plan name
├─ beginTime integer not necessary Download plan start time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ endTime integer not necessary Download plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ enable boolean not necessary Enable
├─ desc string not necessary Remark
├─ fileTypeList string[] not necessary Download file type list ["video", "audio", "image"]

item type: string

├─ not necessary
├─ onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Download device device files

item type: string

├─ not necessary
├─ time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
├─ ID integer not necessary neglect
├─ fileTsMin number not necessary File start time, timestamp (in seconds)
├─ fileTsMax number not necessary File end time, timestamp (in seconds)

Download plan--Delete

Basic Information

Path: /bvcsp/v1/plan/download/:uid

Method: DELETE

Interface description:

Delete download plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid Download Plan ID

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Recording plan--Add

Basic Information

Path: /bvcsp/v1/plan/record

Method: POST

Interface description:

Add recording plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
name string not necessary Video plan name
beginTime integer not necessary Recording plan start time, timestamp (unit second) range [631152000, 253402214400] that is [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
endTime integer not necessary Recording plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
enable boolean not necessary Enable
desc string not necessary Remark
onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Equipment video

item type: string

├─ not necessary
recordTypeList string[] not necessary Video type list ["video", "audio"]

item type: string

├─ not necessary
time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
data object not necessary
├─ uid string not necessary Recording plan UID
├─ name string not necessary Video plan name
├─ beginTime integer not necessary Recording plan start time, timestamp (unit second) range [631152000, 253402214400] that is [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ endTime integer not necessary Recording plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ enable boolean not necessary Enable
├─ desc string not necessary Remark
├─ onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Equipment video

item type: string

├─ not necessary
├─ recordTypeList string[] not necessary Video type list ["video", "audio"]

item type: string

├─ not necessary
├─ time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
├─ ID integer not necessary neglect

Video plan--get

Basic Information

Path: /bvcsp/v1/plan/record/:uid

Method: GET

Interface description:

Get video plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid Recording plan UID

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
data object not necessary
├─ uid string not necessary Recording plan UID
├─ name string not necessary Video plan name
├─ beginTime integer not necessary Recording plan start time, timestamp (unit second) range [631152000, 253402214400] that is [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ endTime integer not necessary Recording plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ enable boolean not necessary Enable
├─ desc string not necessary Remark
├─ onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Equipment video

item type: string

├─ not necessary
├─ recordTypeList string[] not necessary Video type list ["video", "audio"]

item type: string

├─ not necessary
├─ time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
├─ ID integer not necessary neglect

Video plan--Modify

Basic Information

Path: /bvcsp/v1/plan/record/:uid

Method: PUT

Interface description:

Modify recording plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid Recording plan UID

Body

name type Is must default value Remark other information
name string not necessary Video plan name
beginTime integer not necessary Recording plan start time, timestamp (unit second) range [631152000, 253402214400] that is [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
endTime integer not necessary Recording plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
enable boolean not necessary Enable
desc string not necessary Remark
onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Equipment video

item type: string

├─ not necessary
recordTypeList string[] not necessary Video type list ["video", "audio"]

item type: string

├─ not necessary
time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Video plan--query

Basic Information

Path: /bvcsp/v1/plan/record/query

Method: POST

Interface description:

Inquire

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
page integer not necessary Pagination, first page: 0, second page: 1, third page: 2...
pageSize integer not necessary Pagination size > 0
filter object not necessary
├─ desc string not necessary Remark
├─ enable boolean not necessary Is enable
├─ name string not necessary name
├─ uid string not necessary Recording plan UID
├─ match string Must Fuzzy matching (notes, name, recording plan)

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ uid string not necessary Recording plan UID
├─ name string not necessary Video plan name
├─ beginTime integer not necessary Recording plan start time, timestamp (unit second) range [631152000, 253402214400] that is [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ endTime integer not necessary Recording plan end time, timestamp (in seconds) range [631152000, 253402214400], that is, [1990-01-01 00:00:00 - 9999-12-31 00:00:00]
├─ enable boolean not necessary Enable
├─ desc string not necessary Remark
├─ onlineModeList string[] not necessary Device online method list ["wifi", "wireless", "wired"] means that when the device online method is in the list, Equipment video

item type: string

├─ not necessary
├─ recordTypeList string[] not necessary Video type list ["video", "audio"]

item type: string

├─ not necessary
├─ time_slice object[] not necessary Valid time slice list

item type: object

├─ duration integer not necessary Time slice time duration unit seconds [0-604800]
├─ hour integer not necessary Start time[0-23]
├─ minute integer not necessary Start time[0-59]
├─ second integer not necessary Start time[0-59]
├─ week integer not necessary Start time (day of the week) [0-6] Sunday: 0, Monday: 1, Tuesday: 2...
├─ ID integer not necessary neglect

Recording plan--Delete

Basic Information

Path: /bvcsp/v1/plan/record/:uid

Method: DELETE

Interface description:

Delete recording plan

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid Recording plan ID

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Plan device--Modify

Basic Information

Path: /bvcsp/v1/plan/pulist

Method: PUT

Interface description:

add

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
plan_uid string Must Plan UID
pu_id string Must Device ID
channels integer[] not necessary Channel number, only valid in recording plan, ignored in download plan

item type: integer

├─ not necessary

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Plan device--Add

Basic Information

Path: /bvcsp/v1/plan/pulist

Method: POST

Interface description:

add

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
plan_uid string not necessary Plan UID
pu_list object[] not necessary Plan device list

item type: object

├─ pu_id string not necessary Device ID
├─ channels integer[] not necessary Channel number, only valid in recording plan, ignored in download plan

item type: integer

├─ not necessary

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Plan device--Delete

Basic Information

Path: /bvcsp/v1/plan/pulist

Method: DELETE

Interface description:

delete

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
plan_uid string Must Plan UID
pu_id_list string[] Must Device ID list

item type: string

├─ not necessary

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

Planning device--query

Basic Information

Path: /bvcsp/v1/plan/pulist/query

Method: POST

Interface description:

Inquire

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
page integer Must
pageSize integer Must
filter object Must
├─ plan_uid string Must plan uid
├─ pu_id string not necessary device id
├─ pu_name string not necessary Device Name
├─ match string not necessary Fuzzy matching device id, device name

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ pu_id string not necessary device id
├─ pu_name string not necessary Device Name
├─ channels object[] not necessary Channel number, only valid in recording plan, ignored in download plan

item type: object

├─ channel integer not necessary
├─ name string not necessary
├─ select boolean not necessary

Plan device--query not associated

Basic Information

Path: /bvcsp/v1/plan/pulist/unref/query

Method: POST

Interface description:

Inquire

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
page integer Must
pageSize integer Must
filter object Must
├─ pu_id string not necessary device id
├─ pu_name string not necessary Device Name
├─ match string not necessary Fuzzy matching device id, device name
├─ plan_uid string Must plan uid

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ pu_id string not necessary device id
├─ pu_name string not necessary Device Name
├─ channels object[] not necessary Channel number, only valid in recording plan, ignored in download plan

item type: object

├─ channel integer not necessary
├─ name string not necessary

Manual recording--Start

Basic Information

Path: /bvcsp/v1/manualrecord/start

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

Body

name type Is must default value Remark other information
pu_id string Must device id

mock: PU_@hex

channel_index integer Must aisle

mock: 0

video boolean Must Whether to record video

mock: @boolean

audio boolean Must Whether to record audio

mock: @boolean

stop_record_time integer Must Recording end time, the recording will automatically end when the time is up (timestamp, unit second, such as: 1649752074) (0: the recording will never end, Need to manually end the recording state)

mock: @timestamp

Return data

name type Is must default value Remark other information
code integer Must
msg string Must

Manual recording--end

Basic Information

Path: /bvcsp/v1/manualrecord/stop

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes

Body

name type Is must default value Remark other information
pu_id string Must device id

mock: PU_@string

channel_index integer Must aisle

mock: @integer

Return data

name type Is must default value Remark other information
code integer Must
msg string Must

Media stream

Close session

Basic Information

Path: /bvcsp/v1/dialog/close/:dialogid

Method: POST

Interface description:

dialogid is the dialogid returned when opening audio and video, intercom, GPS, and serial channels.

Reference: demo https://gitee.com/besovideo/ewebdemo
demo使用了 https://www.npmjs.com/package/@besovideo/webrtc-player

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
dialogid 123456 Session ID

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

Open device stream webrtc

Basic Information

Path: /bvcsp/v1/dialog/device/webrtc

Method: POST

Interface description:

Used to open the device's real-time transmission channel, obtain the webrtc sdp of the transmission stream and the operation handle of the stream (for closing).

Reference: demo https://gitee.com/besovideo/ewebdemo
demo使用了 https://www.npmjs.com/package/@besovideo/webrtc-player

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Device ID

mock: PU_55AA00

index number Must Channel number

mock: 0

sdp string Must webrtc SDP

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ dialogid string Must handle. Used to mark the open flow of this road. This handle is required to close the stream.

mock: 123456

├─ sdp string Must webrtc SDP

Open device stream bvrtc

Basic Information

Path: /bvcsp/v1/dialog/device/bvrtc

Method: POST

Interface description:

Used to open the device's real-time transmission channel, obtain the bvrtc sdp of the transmission stream and the operation handle of the stream (for closing).
Reference: demo https://gitee.com/besovideo/ewebdemo
demo使用了 https://www.npmjs.com/package/@besovideo/webrtc-player

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Device ID

mock: PU_55AA00

index number Must Channel number

mock: 0

sdp string Must bvrtc SDP

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ dialogid string Must handle. Used to mark the open flow of this road. This handle is required to close the stream.

mock: 123456

├─ sdp string Must bvrtc SDP

Open conference stream webrtc

Basic Information

Path: /bvcsp/v1/dialog/conference/webrtc

Method: POST

Interface description:

It is used to open the transmission channel of the voice conference. The id is the ID of the group, and the index is the ID of the own group member.
Only when members have joined the conference, can they open their own conference member channel!!!, and the direction is audio intercom.

Reference: demo https://gitee.com/besovideo/ewebdemo
demo使用了 https://www.npmjs.com/package/@besovideo/webrtc-player

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Meeting ID

mock: 555444

sdp string Must webrtc SDP

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ dialogid string Must handle. Used to mark the open flow of this road. This handle is required to close the stream.

mock: 123456

├─ sdp string Must webrtc SDP

Open conference stream bvrtc

Basic Information

Path: /bvcsp/v1/dialog/conference/bvrtc

Method: POST

Interface description:

It is used to open the transmission channel of the voice conference. The id is the ID of the group, and the index is the ID of the own group member.
Only when members have joined the conference, can they open their own conference member channel!!!, and the direction is audio intercom.

Reference: demo https://gitee.com/besovideo/ewebdemo
demo使用了 https://www.npmjs.com/package/@besovideo/webrtc-player

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Meeting ID

mock: 555444

sdp string Must webrtc SDP

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ dialogid string Must handle. Used to mark the open flow of this road. This handle is required to close the stream.

mock: 123456

├─ sdp string Must webrtc SDP

Open conference stream websocket

Basic Information

Path: /bvcsp/v1/dialog/conference/bvwsc

Method: POST

Interface description:

It is used to open the transmission channel of the voice conference. The id is the ID of the group, and the index is the ID of the own group member.
Only when members have joined the conference, can they open their own conference member channel!!!, and the direction is audio intercom.

dialogid is used to close the channel.
url: websocket path used to get/push audio data, for example: /bvvtdu/960d7a3998169b9c/ws-bvrtc?stream=eyJzc3JjIjo2NCwicGF5bG9hZFR5cGUiOjgsImNvZGUiOiJQQ01BIiwiY2hhbm5lbHMiOjEsInNhbXBsZVJhd GUiOjgwMDB9
websocket content format: (8 bytes reserved, all zeros) (8 bytes timestamp, network sequence, milliseconds) (frame data)
If no audio data is sent, an empty packet must be sent in 5 seconds to keep it alive.

Reference: demo https://gitee.com/besovideo/ewebdemo
demo使用了 https://www.npmjs.com/package/@besovideo/webrtc-player

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Meeting ID

mock: 555444

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ dialogid string Must handle. Used to mark the open flow of this road. This handle is required to close the stream.

mock: 123456

├─ url string Must Data websocket path
├─ audio_side object Must encoded information
├─ code string Must audio encoder
├─ channels number Must Number of channels
├─ SampleRate number Must Sampling Rate

Open playback stream

Basic Information

Path: /bvcsp/v1/dialog/playback

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
ID string Must Device ID

mock: PU_55AA00

sdp string Must bvrtc SDP

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ dialogid string Must handle. Used to mark the open flow of this road. This handle is required to close the stream.

mock: 123456

├─ sdp string Must bvrtc SDP

Playback control

Basic Information

Path: /bvcsp/v1/dialog/playback/:dialogId

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

path parameters

parameter name Example Remark
dialogId

Body

name type Is must default value Remark other information
cmd string Must PAUSE/PLAY/SEEK/TEARDOWN(Jump+Play:PLAY)
range number [] not necessary Unit seconds Time offset relative to the beginning of the file [20.2, 30.5] Play/Jump

item type: number

├─ not necessary
scale number not necessary Rate, 1.0: normal playback, negative values ​​reverse playback

Return data

name type Is must default value Remark other information
code number Must return code

Enumeration notes: 0: Success 1: The channel does not exist 2: The channel does not support audio 3: The device is not online 4: Unsupported media streaming protocol 5: Server internal processing error 6: Unknown error

mock: 0

msg string Must Result description

mock: OK

data object not necessary
├─ range number [] Must Unit seconds Time offset relative to the beginning of the file [20.2, 30.5] Play/Jump

item type: number

├─ not necessary
├─ scale number Must Rate, 1.0: normal playback, negative values ​​reverse playback
├─ seq integer Must (uint16) rtp packet seq
├─ rtpTime integer Must (uint32) rtp packet time

Get dialog list

Basic Information

Path: /bvcsp/v1/dialog/list

Method: POST

Interface description:

The requester and requestee types are enumerated as follows:

type illustrate
PU Device
User user
Conf Meeting
Server Serve

Channel status:

value illustrate
Inviting Opening request
Reinviting Change request in progress
Working working
Closed closed

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching channel ID, user ID, device ID
├─ deviceID string not necessary Device ID
├─ userID string not necessary User ID
├─ proto string not necessary "webrtc" "bvrtc"
├─ index number not necessary Channel number

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ ID string Must dialog ID

mock: 000000

├─ time number Must Open channel time
├─ index number Must Channel number
├─ status string Must state
├─ requesterType string not necessary Requester type
├─ requesterId string not necessary The requester ID can be the device ID (PU_1), conference ID (CONF_1), user account, or service ID.
├─ requesterDir string not necessary Requestor media direction.
├─ requesterProto string not necessary media stream protocol. Such as: "bvrtc", "webrtc"
├─ r_upBitrateShort number not necessary The data rate the server sends. byte/s
├─ r_dwBitrateShort number not necessary The data rate the server receives. byte/s
├─ r_upDataSize number not necessary The amount of data sent by the server. byte
├─ r_dwDataSize number not necessary The amount of data the server received. byte
├─ r_upLostCount number not necessary The number of lost packets sent by the server. indivual
├─ r_dwLostCount number not necessary The number of lost packets received by the server. indivual
├─ r_upLostrateShort number not necessary The packet loss rate sent by the server. One ten thousandth
├─ r_dwLostrateShort number not necessary The server receives the packet loss rate. One ten thousandth
├─ targetType string not necessary target type
├─ targetId string not necessary The requested party ID can be device ID (PU_1), conference ID (CONF_1), user account, or service ID.
├─ targetDir string not necessary Requested media direction.
├─ targetProto string not necessary Requestor Media Streaming Protocol
├─ t_upBitrateShort number not necessary The data rate the server sends. byte/s
├─ t_dwBitrateShort number not necessary The data rate the server receives. byte/s
├─ t_upDataSize number not necessary The amount of data sent by the server. byte
├─ t_dwDataSize number not necessary The amount of data the server received. byte
├─ t_upLostCount number not necessary The number of lost packets sent by the server. indivual
├─ t_dwLostCount number not necessary The number of lost packets received by the server. indivual
├─ t_upLostrateShort number not necessary The packet loss rate sent by the server. One ten thousandth
├─ t_dwLostrateShort number not necessary The server receives the packet loss rate. One ten thousandth
info object not necessary
├─ upBitrateShort number not necessary The data rate the server sends. byte/s
├─ dwBitrateShort number not necessary The data rate the server receives. byte/s

Get session information

Basic Information

Path: /bvcsp/v1/dialog/info/:id

Method: GET

Interface description:

terminal type:

type illustrate
PU Device
User user
Conf Meeting
Server Serve

Channel status:

value illustrate
Inviting Opening request
Reinviting Change request in progress
Working working
Closed closed

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID dialog ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary group information
├─ ID string Must dialog ID

mock: 000000

├─ time number Must Open channel time
├─ index number not necessary Channel number
├─ status string Must state
├─ requester object not necessary Requester
├─ ID string Must
├─ time string Must creation time
├─ objType string Must terminal type
├─ objId string Must Terminal ID, which can be device ID (PU_1), conference ID (CONF_1), user account, service ID
├─ mediaDir number Must media direction
├─ proto string not necessary Media streaming protocol. Such as: "bvrtc", "webrtc"
├─ protoc string not necessary Underlying network protocol: "UDP" "TCP" "WSBV", default "UDP"
├─ objAddr string not necessary Terminal address
├─ vtduAddr string not necessary Streaming media server address
├─ code string not necessary encoded information
├─ upDataSize number not necessary The amount of data sent by the server. byte
├─ dwDataSize number not necessary The amount of data the server received. byte
├─ upBitrateShort number not necessary The data rate the server sends. byte/s
├─ dwBitrateShort number not necessary The data rate the server receives. byte/s
├─ target object not necessary Requestee
├─ ID string Must
├─ time string Must creation time
├─ objType string Must terminal type
├─ objId string Must Terminal ID, which can be device ID (PU_1), conference ID (CONF_1), user account, service ID
├─ mediaDir number Must media direction
├─ proto string not necessary Media streaming protocol. Such as: "bvrtc", "webrtc"
├─ protoc string not necessary Underlying network protocol: "UDP" "TCP" "WSBV", default "UDP"
├─ objAddr string not necessary Terminal address
├─ vtduAddr string not necessary Streaming media server address
├─ code string not necessary encoded information
├─ upDataSize number not necessary The amount of data sent by the server. byte
├─ dwDataSize number not necessary The amount of data the server received. byte
├─ upBitrateShort number not necessary The data rate the server sends. byte/s
├─ dwBitrateShort number not necessary The data rate the server receives. byte/s

Check out the list of streaming services

Basic Information

Path: /bvcsp/v1/dialog/vtdu/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary list

item type: object

├─ ID string Must ID

mock: 000000

├─ status object not necessary state
├─ baseInfo string Must
├─ status object[] Must state

item type: object

├─ name string Must Data name
├─ Unit string Must data unit
├─ Interval number Must Data collection interval, seconds
├─ Timestamp number Must Latest data collection timestamp, seconds
├─ data number [] Must data value

item type: number

├─ not necessary

Reset streaming service statistics

Basic Information

Path: /bvcsp/v1/dialog/vtdu/statistics/reset

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
string[] not necessary vtdu id list

item type: string

├─ not necessary vtdu id list

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Contact person

Unpin

Basic Information

Path: /bvcsp/v1/contact/settop/:id

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/x-www-form-urlencoded yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID 1 Pinned record id

Return data

name type Is must default value Remark other information
msg string Must Result description

mock: "Successful operation"

code number Must error code

mock: 0

Add pin

Basic Information

Path: /bvcsp/v1/contact/settop

Method: POST

Interface description:

contactid: Contact ID, which can be: user account, device ID, group ID.
contacttype: Contact type, corresponding to: User, PU, IMGroup, UserGroup, PUGroup.
id: After the pin is successfully pinned, the pinned record ID is returned, which is needed when canceling the pin.

When an object that has been pinned to the top is pinned again, the id of the pinned record will be returned.

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Pinned record id

Body

name type Is must default value Remark other information
contactid string Must contact id
contacttype string Must Contact type

Return data

name type Is must default value Remark other information
msg string Must Result description

mock: "Successful operation"

code number Must error code

mock: 0

data object Must Obtained token information
├─ ID number Must Pinned record id

Get pinned list

Basic Information

Path: /bvcsp/v1/contact/settops

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching pinned object ID

mock: 00

├─ contactType string not necessary mate object type

mock: 000000

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary Pinned list

item type: object

├─ ID number Must Pinned record id
├─ contactid string Must contact id
├─ contacttype string Must Contact type
├─ settoptime number Must Pin time

module program

cs app query

Basic Information

Path: /bvcsp/v1/csapp

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Query

parameter name Is must Example Remark
page yes file page, [0, 1, 2, 3...]
pageSize yes page size, > 0

Return data

name type Is must default value Remark other information
code integer not necessary error code
msg string not necessary error message
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary load

item type: object

├─ appid string not necessary Module program unique identifier
├─ author string not necessary author
├─ copyright string not necessary copyright
├─ e_mail string not necessary Contact information (email)
├─ enable boolean not necessary Whether the module program is enabled
├─ ico string not necessary icon path
├─ licenses string not necessary Authorize
├─ name string not necessary name
├─ notes string not necessary Remark
├─ order_index integer not necessary The demo uses Module program sorting, the smaller the order, the higher it is, the range is [0,1,2,3,4]
├─ path string not necessary Load path
├─ version string not necessary Version

cs app batch modification

Basic Information

Path: /bvcsp/v1/csapp

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
data object[] Must

item type: object

├─ appid string Must Module program unique identifier
├─ enable boolean Must Whether the module program is enabled
├─ order_index integer Must The demo uses Module program sorting, the smaller the order, the higher it is, the range is [0,1,2,3,4]

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

cs app modification

Basic Information

Path: /bvcsp/v1/csapp/{uid}

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
uid module app uid

Body

name type Is must default value Remark other information
appid string Must Module program unique identifier
enable boolean Must Whether the module program is enabled
order_index integer Must The demo uses Module program sorting, the smaller the order, the higher it is, the range is [0,1,2,3,4]

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

webapp query

Basic Information

Path: /bvcsp/v1/webapp

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Query

parameter name Is must Example Remark
page yes file page, [0, 1, 2, 3...]
pageSize yes page size, > 0

Return data

name type Is must default value Remark other information
code integer not necessary error code
msg string not necessary error message
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary load

item type: object

├─ appid string not necessary Module program unique identifier
├─ author string not necessary author
├─ copyright string not necessary copyright
├─ e_mail string not necessary Contact information (email)
├─ ico string not necessary icon path
├─ config_json_schema string not necessary Configuration template, empty if not supported.
├─ licenses string not necessary Authorize
├─ name string not necessary name
├─ notes string not necessary Remark
├─ path string not necessary Load path
├─ version string not necessary Version

webapp Get home page

Basic Information

Path: /bvcsp/v1/webapp/home

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Return data

name type Is must default value Remark other information
code integer not necessary error code
msg string not necessary error message
data object not necessary
├─ appid string not necessary Module program unique identifier
├─ author string not necessary author
├─ copyright string not necessary copyright
├─ e_mail string not necessary Contact information (email)
├─ ico string not necessary icon path
├─ licenses string not necessary Authorize
├─ name string not necessary name
├─ notes string not necessary Remark
├─ path string not necessary Load path
├─ version string not necessary Version

webapp set home page

Basic Information

Path: /bvcsp/v1/webapp/home

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Query

parameter name Is must Example Remark
appId yes home app id

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

webapp Get configuration

Basic Information

Path: /bvcsp/v1/webapp/config/:appid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
appid app unique ID

Return data

name type Is must default value Remark other information
code integer not necessary error code
msg string not necessary error message
data object not necessary
├─ appid string not necessary Module program unique identifier
├─ config string not necessary Platform configuration, json string

webapp settings configuration

Basic Information

Path: /bvcsp/v1/webapp/config

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Body

name type Is must default value Remark other information
appid string Must app unique identification ID
config string Must Configuration, json string

Return data

name type Is must default value Remark other information
code integer not necessary
msg string not necessary

plugapp query

Basic Information

Path: /bvcsp/v1/pluginapp

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

Query

parameter name Is must Example Remark
page yes file page, [0, 1, 2, 3...]
pageSize yes page size, > 0

Return data

name type Is must default value Remark other information
code integer not necessary error code
msg string not necessary error message
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary load

item type: object

├─ appid string not necessary Module program unique identifier
├─ author string not necessary author
├─ copyright string not necessary copyright
├─ e_mail string not necessary Contact information (email)
├─ ico string not necessary icon path
├─ licenses string not necessary Authorize
├─ name string not necessary name
├─ notes string not necessary Remark
├─ path string not necessary Load path
├─ version string not necessary Version

module query

Basic Information

Path: /bvcsp/v1/module/:appid

Method: GET

Interface description:

status: 
    0-stop
    1-stopping
    2-start
    3 - starting
    4-failed
    5 - does not exist
    6-end

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authentication header

path parameters

parameter name Example Remark
appid module appid

Return data

name type Is must default value Remark other information
code integer not necessary error code
msg string not necessary error message
data object not necessary Module information
├─ moduleInfo object Must Module basic information
├─ appid string Must Module unique ID
├─ module string Must Module short identifier
├─ name string not necessary module name
├─ plugin boolean Must Is it a plug-in?
├─ path string not necessary installation path
├─ cmd string not necessary Start command, cannot be started when empty
├─ auto_start boolean not necessary Whether to start automatically
├─ not_allow_stop boolean not necessary Manual stop not allowed
├─ run_num number not necessary Number of instances started
├─ wait_time string not necessary Start waiting time
├─ args string[] not necessary Startup parameters

item type: string

├─ not necessary parameter
├─ process object[] not necessary process information

item type: object

├─ info object Must details
├─ ID string Must process management identifier
├─ pid string Must pid
├─ status number Must Operating status
├─ start_time number not necessary Last start time
├─ version string not necessary Version
├─ build_time string not necessary Compilation date

Black and white list

Modify black/white list

Basic Information

Path: /bvcsp/v1/bw/config

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes token returned by login

Body

name type Is must default value Remark other information
enable number Must Whether to enable black or white lists

enumerate: 0,1,2

Enumeration notes: 0: Turn off the black and white list, 1: Black list, 2: White list

mock: 0

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete black/white list

Basic Information

Path: /bvcsp/v1/bw/resource/del

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
items object[] not necessary Delete resources

item type: object

├─ bwID number Must Black and white list unique ID

mock: 0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

Add black/white list

Basic Information

Path: /bvcsp/v1/bw/resource/add

Method: POST

Interface description:

objType black and white list object type:
    0: Invalid type
    1: Equipment
    2: User
    3: IP address

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
items object[] not necessary Add resources

item type: object

├─ bwType number Must list type

enumerate: 0,1,2

Enumeration notes: 0: invalid type, 1: blacklist, 2: whitelist

mock: 1

├─ objType number Must Object type

enumerate: 0,1,2

Enumeration notes: 0: invalid, 1: device, 2: user

mock: 1

├─ objID string Must Object ID

mock: PU_0

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] Must Added resource successfully

item type: object

├─ bwID number Must Black and white list unique ID

mock: 0

├─ bwType number Must list type

enumerate: 0,1,2

Enumeration notes: 0: invalid type, 1: blacklist, 2: whitelist

mock: 1

├─ objType number Must Object type

enumerate: 0,1,2

Enumeration notes: 0: invalid, 1: device, 2: user

mock: 1

├─ objID string Must Object ID

mock: PU_0

Get black/white list

Basic Information

Path: /bvcsp/v1/bw/resource/list

Method: POST

Interface description:

objType black and white list object type:
    0: Invalid type
    1: Equipment
    2: User
    3: IP address

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ bwType number not necessary list type

enumerate: 0,1,2

Enumeration notes: 0: No filtering type, 1: Blacklist, 2: Whitelist

mock: 0

├─ match string not necessary Fuzzy matching object ID. Device ID

mock: test

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Paginated results information
├─ page number not necessary Pagination, starting from scratch

mock: 0

├─ pageSize number not necessary Paging Size

mock: 20

├─ totalCount number not necessary Total number of entries

mock: 1000

data object[] not necessary group list

item type: object

├─ bwID number Must Black and white list unique ID

mock: 0

├─ bwType number Must list type

enumerate: 0,1,2

Enumeration notes: 0: invalid type, 1: blacklist, 2: whitelist

mock: 1

├─ objType number Must Object type

enumerate: 0,1,2

Enumeration notes: 0: invalid, 1: device, 2: user

mock: 1

├─ objID string Must Object ID

mock: PU_0

Get black/white list

Basic Information

Path: /bvcsp/v1/bw/config

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Black and white list configuration
├─ enable number Must Whether to enable black or white lists.

enumerate: 0,1,2

Enumeration notes: 0: Turn off the black and white list, 1: Black list, 2: White list

mock: 0

Platform storage status

Download plan list

Basic Information

Path: /bvcsp/v1/monitor/planList

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authorization (Only:undefined)

Body

name type Is must default value Remark other information
filter object not necessary
├─ plan_uid string not necessary Download plan uid
page integer not necessary Pagination, >= 0

Minimum value: 0

pageSize integer not necessary Paging size >= 1

Maximum value: 1

Return data

name type Is must default value Remark other information
code integer not necessary
data object[] not necessary

item type: object

├─ enable boolean not necessary Is the download plan currently available?
├─ not_enable_reason string not necessary If it is currently unavailable, why
├─ plan_uid string not necessary Download plan uid
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary

Download plan device list

Basic Information

Path: /bvcsp/v1/monitor/planPuList/{uid}

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authorization (Only:undefined)

path parameters

parameter name Example Remark
uid download plan uid

Body

name type Is must default value Remark other information
filter object not necessary
├─ puId string not necessary device id
page integer not necessary Pagination, >= 0

Minimum value: 0

pageSize integer not necessary Paging size >= 1

Maximum value: 1

Return data

name type Is must default value Remark other information
code integer not necessary
data object[] not necessary

item type: object

├─ downloading object not necessary
├─ beginTime integer not necessary Recording file start time timestamp (unit second)
├─ bootTime integer not necessary Start Time
├─ endTime integer not necessary Recording file end time timestamp (unit second)
├─ fileSize integer not necessary File size (unit byte)
├─ lastGetPuFileTime integer not necessary Last time to obtain device file -
├─ lastGetStatusTime integer not necessary The most recent time to obtain device online information -
├─ onlineAddr string not necessary Online address
├─ onlineThrough integer not necessary Online method
├─ onlineThroughString string not necessary Online method string description
├─ onlineTime integer not necessary Device online time
├─ proto string not necessary Online agreement
├─ puId string not necessary Device ID
├─ remotePath string not necessary Full file path
├─ status integer not necessary Device status 1: online
├─ transferSize integer not necessary Transferred size bytes
├─ transferString string not necessary Transfer information string
├─ name string not necessary
├─ notEnableReason string not necessary If it is currently unavailable, why
├─ nowIsEnable boolean not necessary Currently available
├─ online boolean not necessary Online?
├─ puFirstFileTime integer not necessary The oldest file time timestamp among the retrieved files (in seconds)
├─ puHistoryLastSearchTime integer not necessary The time when the history file was last retrieved
├─ puHistoryPuFileSearchMsg string not necessary
├─ puId string not necessary
├─ puLastFileTime integer not necessary The latest file time timestamp in the retrieved file (in seconds)
├─ puLastSearchHistoryBeginTime integer not necessary The start time of the last file retrieval (backward)
├─ puLastSearchHistoryEndTime integer not necessary The end time of the last time the file was retrieved (backwards)
├─ puLastSearchNewFileBeginTime integer not necessary The start time of the last time the file was retrieved (forward)
├─ puLastSearchNewFileEndTime integer not necessary The end time of the last time the file was retrieved (forward)
├─ puNewFileLastSearchTime integer not necessary The time when new files were last retrieved (new files: media files recently created by the device)
├─ puNewPuFileSearchMsg string not necessary
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary

Downloading list

Basic Information

Path: /bvcsp/v1/monitor/downloading

Method: POST

Interface description:

It is recommended to use the session list interface /bvcsp/v1/bvnvr/v1/dialog

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authorization (Only:undefined)

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code integer not necessary
data object[] not necessary

item type: object

├─ beginTime integer not necessary Recording file start time timestamp (unit second)
├─ bootTime integer not necessary Start Time
├─ endTime integer not necessary Recording file end time timestamp (unit second)
├─ fileSize integer not necessary File size (unit byte)
├─ lastGetPuFileTime integer not necessary Last time to obtain device file -
├─ lastGetStatusTime integer not necessary The most recent time to obtain device online information -
├─ onlineAddr string not necessary Online address
├─ onlineThrough integer not necessary Online method
├─ onlineThroughString string not necessary Online method string description
├─ onlineTime integer not necessary Device online time
├─ proto string not necessary Online agreement
├─ puId string not necessary Device ID
├─ remotePath string not necessary Full file path
├─ status integer not necessary Device status 1: online
├─ transferSize integer not necessary Transferred size bytes
├─ transferString string not necessary Transfer information string
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary

Device file list

Basic Information

Path: /bvcsp/v1/monitor/puFileList

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Authorization (Only:undefined)

Body

name type Is must default value Remark other information
filter object not necessary
├─ ChannelIndex integer not necessary channel id
├─ FileType string not necessary File Type["video", "audio", "image"] bvpstruct.RecordFileType*
├─ PuId string not necessary Device ID
├─ downloadState integer not necessary Download status. 1: Downloaded. 2: Not downloaded 3: Downloading
page integer not necessary Pagination, >= 0

Minimum value: 0

pageSize integer not necessary Paging size >= 1

Maximum value: 1

Return data

name type Is must default value Remark other information
code integer not necessary bvapibase.ErrorCode
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ ID integer not necessary fileId primary key, unique identifier of the file
├─ downloadState integer not necessary Download status. 1: Already downloaded. 2: Not downloaded 3: Downloading (temporary status)
├─ filePath string not necessary Store full path
├─ puId string not necessary Device ID
├─ channel_index integer not necessary Channel number
├─ file_type string not necessary file type
├─ file_size integer not necessary File size (unit byte)
├─ begin_time integer not necessary Recording file start timestamp, in seconds
├─ end_time integer not necessary The end timestamp of the video file, in seconds
├─ insert_time integer not necessary File storage time
├─ record_reason string not necessary Reason for video recording
├─ desc_1 string not necessary Description 1
├─ desc_2 string not necessary Description 2
├─ user_id string not necessary
├─ downloadLevel integer not necessary Download priority, 0 is the lowest, the larger the value, the higher the priority
├─ failDownloadCount integer not necessary Download failed times
├─ lastDownloadTime integer not necessary Last download time
├─ downloading object not necessary
├─ localPath string not necessary local save location
├─ transferSize integer not necessary Transferred size bytes
├─ transBytesSpeed integer not necessary Transmission rate
├─ dialogId string not necessary Session ID
├─ peerConnectionId integer not necessary Connection ID

Retry/Priority Download

Basic Information

Path: /bvcsp/v1/monitor/file/{fileId}

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

path parameters

parameter name Example Remark
fileId File id, device file list

Body

name type Is must default value Remark other information
downloadLevel integer not necessary Download priority, 0 is the lowest, the larger the value, the higher the priority (no parameters are passed and will not be modified)
failDownloadCount integer not necessary Number of failed downloads (demarcation line 10, download prohibited: > 10, re-download: [0, 9)) (no parameters will be passed and no modification will be made)

Return data

name type Is must default value Remark other information
code integer not necessary bvapibase.ErrorCode
msg string not necessary

Redownload (downloaded file)

Basic Information

Path: /bvcsp/v1/monitor/redownload/{fileId}

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

path parameters

parameter name Example Remark
fileId File id, device file list

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code integer not necessary bvapibase.ErrorCode
msg string not necessary

Conversation list

Basic Information

Path: /bvcsp/v1/monitor/dialog

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

Body

name type Is must default value Remark other information
page integer not necessary Pagination, >= 0

Minimum value: 0

pageSize integer not necessary Paging size >= 1

Maximum value: 1

filter object not necessary
├─ transportType string not necessary Transmission type (passive download, passive upload, video record, Active DownloadActiveDownload)
├─ puId string not necessary device id

Return data

name type Is must default value Remark other information
code integer not necessary bvapibase.ErrorCode
msg string not necessary
pageInfo object not necessary
├─ page integer not necessary
├─ pageSize integer not necessary
├─ totalCount integer not necessary
data object[] not necessary

item type: object

├─ dialogId string not necessary session unique identifier
├─ peerConnectionId integer not necessary Connection unique identifier
├─ puId string not necessary Device ID
├─ transportType string not necessary Transmission type (download: passive download, upload: passive upload, record: video, ActiveDownload: Active download)
├─ remoteFilename string not necessary When downloading a file, the device file name
├─ localFilename string not necessary When the file is downloaded, the server saves the file name
├─ FileTransSize integer not necessary File transferred size, in bytes
├─ FileTotalSize integer not necessary Total file size, in bytes
├─ transBytesSpeed integer not necessary Transmission rate unit bytes/s
├─ createTime integer not necessary Creation timestamp, in seconds
├─ reason string not necessary
├─ Ext string not necessary
transInfo object not necessary
├─ download object Must Passive download
├─ count integer Must Number of ways
├─ rates integer Must Rate unit: bytes/s
├─ transSize integer Must Total transfer size bytes
├─ totalSize integer Must Total size bytes
├─ upload object Must Passive upload
├─ count integer Must Number of ways
├─ rates integer Must Rate unit: bytes/s
├─ transSize integer Must Total transfer size bytes
├─ totalSize integer Must Total size bytes
├─ record object Must Video
├─ count integer Must Number of ways
├─ rates integer Must Rate unit: bytes/s
├─ activeDownload object Must Active download
├─ count integer Must Number of ways
├─ rates integer Must Rate unit: bytes/s
├─ transSize integer Must Total transfer size bytes
├─ totalSize integer Must Total size bytes

Close session

Basic Information

Path: /bvcsp/v1/monitor/dialog/close/{dialogId}

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes

path parameters

parameter name Example Remark
dialogId

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code integer not necessary bvapibase.ErrorCode
msg string not necessary

Recording plan log-device

Basic Information

Path: /bvcsp/v1/plan/recordLog/device/:puId/:channel

Method: GET

Interface description:

event type

"CheckRecord" // Check recording conditions
"StatusEvent" // Online and offline status events

"PrepareRecord" // Prepare to record
"StartRecord" // Start recording
"OpenDialog" // Open audio and video
"OpenDialogFail" // Failed to open audio and video
"DialogEvent" // Channel event
"CreateRecordFile" //Create video file
"Recording"        // Recording
"SplitRecord" // Split video
"StopRecord" // End recording
"SaveRecord" // Save the video

Parameters

path parameters

parameter name Example Remark
puId
channel

Return data

name type Is must default value Remark other information
code integer Must
msg string Must
data object Must
├─ puId string Must Event associated device id
├─ channel integer Must Device channel number
├─ event string Must Event type, reference notes
├─ info string Must event information
├─ time integer Must Event time (in milliseconds)
├─ score integer Must Score, i.e. timestamp (unit: milliseconds)

Recording plan log-plan

Basic Information

Path: /bvcsp/v1/plan/recordLog/plan/:planId

Method: GET

Interface description:

Parameters

path parameters

parameter name Example Remark
planId

Return data

name type Is must default value Remark other information
code integer Must
msg string Must
data object Must
├─ planId string Must Recording plan id
├─ info string Must event information
├─ time integer Must Event time (in milliseconds)
├─ score integer Must Score, i.e. timestamp (unit: milliseconds)

28181out

Add parent platform

Basic Information

Path: /bvcsp/v1/bv28181out/upperserver/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
name string Must name
localGB28181ServerId string Must Subordinate platform id
localIp string Must Subordinate platform IP address
localPort number Must Lower-level platform signaling port number, 0 means random
password string Must password
upperGB28181ServerId string Must Upper level platform id
upperIp string Must Upper level platform ip address
upperPort number Must Upper-level platform signaling port number
disable boolean Must Whether to disable
notIncludeChannel boolean Must Channels are not included. Some platform devices do not allow mounting channels. Channels are reported as devices. The default is false to include channels.

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description
data object Must title
├─ ID number Must configuration id
├─ name string Must name
├─ localGB28181ServerId string Must Subordinate platform id
├─ localIp string Must Subordinate platform IP address
├─ localPort number Must Lower-level platform signaling port number, 0 means random
├─ password string Must password
├─ upperGB28181ServerId string Must Upper level platform id
├─ upperIp string Must Upper level platform ip address
├─ upperPort number Must Upper-level platform signaling port number
├─ disable boolean Must Whether to disable
├─ notIncludeChannel boolean Must Channels are not included. Some platform devices do not allow mounting channels. Channels are reported as devices. The default is false to include channels.

Get superior platform information

Basic Information

Path: /bvcsp/v1/bv28181out/upperserver/:id

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description
data object not necessary title
├─ ID number Must configuration id
├─ name string Must name
├─ localGB28181ServerId string Must Subordinate platform id
├─ localIp string Must Subordinate platform IP address
├─ localPort number Must Lower-level platform signaling port number, 0 means random
├─ password string Must password
├─ upperGB28181ServerId string Must Upper level platform id
├─ upperIp string Must Upper level platform ip address
├─ upperPort number Must Upper-level platform signaling port number
├─ disable boolean Must Whether to disable
├─ notIncludeChannel boolean Must Channels are not included. Some platform devices do not allow mounting channels. Channels are reported as devices. The default is false to include channels.

Modify upper-level platform

Basic Information

Path: /bvcsp/v1/bv28181out/upperserver/:id

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID

Body

name type Is must default value Remark other information
name string not necessary name
localGB28181ServerId string not necessary Subordinate platform id
localIp string not necessary Subordinate platform IP address
localPort number not necessary Lower-level platform signaling port number, 0 means random
password string Must password
upperGB28181ServerId string not necessary Upper level platform id
upperIp string not necessary Upper level platform ip address
upperPort number not necessary Upper-level platform signaling port number
disable boolean Must Whether to disable
notIncludeChannel boolean Must Channels are not included. Some platform devices do not allow mounting channels. Channels are reported as devices. The default is false to include channels.

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description

Delete parent platform

Basic Information

Path: /bvcsp/v1/bv28181out/upperserver/:id

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description

push directory

Basic Information

Path: /bvcsp/v1/bv28181out/pushcatalog/:id

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Upper level platform id

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code string Must error code
msg string Must Result description

Get upper-level platform list

Basic Information

Path: /bvcsp/v1/bv28181out/upperserverlist

Method: GET

Interface description:




Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Configuration information
├─ upperservers object[] Must Configuration information list

item type: object

├─ state object Must status information
├─ onlineStatus boolean Must online status
├─ onlineDeviceCount number Must Current number of online devices
├─ dialogCount number Must Number of currently open channels
├─ info object Must title Configuration information
├─ ID number Must configuration id
├─ name string Must name
├─ localGB28181ServerId string Must Subordinate platform id
├─ localIp string Must Subordinate platform IP address
├─ localPort number Must Lower-level platform signaling port number, 0 means random
├─ password string Must password
├─ upperGB28181ServerId string Must Upper level platform id
├─ upperIp string Must Upper level platform ip address
├─ upperPort number Must Upper-level platform signaling port number
├─ disable boolean Must Whether to disable
├─ notIncludeChannel string Must Channels are not included. Some platform devices do not allow mounting channels. Channels are reported as devices. The default is false to include channels.

Get status

Basic Information

Path: /bvcsp/v1/bv28181out/state

Method: GET

Interface description:

Certification status

type AU_Result int32

const (
   AU_Result_AU_Result_FAIL AU_Result = 0
   AU_Result_AU_Result_Token_Error AU_Result = 1
   AU_Result_AU_Result_Database_Error AU_Result = 2
   AU_Result_AU_Result_Internal_Error              AU_Result = 3
   AU_Result_AU_Result_No_Login AU_Result = 4
   AU_Result_AU_Result_DeSerialize_Fail AU_Result = 5
   AU_Result_AU_Result_Un_Support AU_Result = 6
   AU_Result_AU_Result_DisConnect AU_Result = 7
   AU_Result_AU_Result_Connect_Fail AU_Result = 8
   AU_Result_AU_Result_Server_Busy AU_Result = 9
   AU_Result_AU_Result_Parse_Error AU_Result = 10
   AU_Result_AU_Result_Decrypt_Fail AU_Result = 11
   AU_Result_AU_Result_No_AppInfo AU_Result = 12 // No APP development information
   AU_Result_AU_Result_Not_Found_AppInfo AU_Result = 13
   AU_Result_AU_Result_App_Key_Error AU_Result = 14
   AU_Result_AU_Result_App_Status_Error AU_Result = 15
   AU_Result_AU_Result_Not_Found AU_Result = 16
   AU_Result_AU_Result_No_Trial_Quota AU_Result = 17 //No trial quota
   AU_Result_AU_Result_Trial_Expire                AU_Result = 18 //Trial period expires
   AU_Result_AU_Result_Trial_Timeout AU_Result = 19 //Trial timeout
   AU_Result_AU_Result_Trial_KickOut AU_Result = 20 //Kick offline
   AU_Result_AU_Result_Trail_Deny AU_Result = 21 // Deny trial, not allowed by administrator
   AU_Result_AU_Result_Type_Error AU_Result = 22 //Type error
   AU_Result_AU_Result_No_WriteBack_Times          AU_Result = 23 //  No authentication writeback times (ie: the number to write back authorization based on hardware info has been exhausted)
   AU_Result_AU_RResult_Register_FAIL AU_Result = 51
   AU_Result_AU_RResult_Register_Wait AU_Result = 52
   AU_Result_AU_RResult_Register_Timeout           AU_Result = 53
   AU_Result_AU_RResult_Register_Have_Registed AU_Result = 54 // Already registered
   AU_Result_AU_RResult_Register_No_Cert AU_Result = 55 // No certificate provided
   AU_Result_AU_RResult_Register_Internal_Error AU_Result = 56 // Registration, internal error
   AU_Result_AU_RResult_Register_Not_Original_Cert AU_Result = 57 // Not the original certificate
   AU_Result_AU_Result_Have_Login AU_Result = 101 // A terminal has already logged in using this information
   AU_Result_AU_Result_Cert_State_Error AU_Result = 102 // Certificate status error
   AU_Result_AU_Result_Cert_TimeOut_Error          AU_Result = 103 // Certificate expired
   AU_Result_AU_Result_No_SerialNumber AU_Result = 104 // No device information
   AU_Result_AU_Result_Login_FAIL AU_Result = 105
   AU_Result_AU_Result_Revoke_Authorization AU_Result = 106 // Revoke authorization
   AU_Result_AU_Result_Pause_Authorization AU_Result = 107 // Pause authorization
   AU_Result_AU_Result_Login_Elsewhere AU_Result = 108 // Login elsewhere
   AU_Result_AU_Result_Cert_UseUp                  AU_Result = 109 //Certificate authorization times exhausted
   AU_Result_AU_Result_KeepAlive_No_Token AU_Result = 151 // The server has no token when keeping alive
   AU_Result_AU_Result_KeepAlive_No_Session AU_Result = 152 //The connection does not exist
   AU_Result_AU_Result_Key_State_Error AU_Result = 250 // Product key status error
   AU_Result_AU_Result_Key_Expire AU_Result = 251 // Product key expires
   AU_Result_AU_Result_Key_UseUp AU_Result = 252 //The number of product key authorizations has been exhausted
   AU_Result_AU_Result_OK AU_Result = 1024
   AU_Result_AU_Result_Trail_OK AU_Result = 1025
)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Configuration information
├─ authState object Must Authentication status information
├─ authResult number Must Certification status
├─ modAuthResult number Must Module authentication status, 0: failed, 1: successful
├─ maxDialogCount number Must Maximum number of channels, 0 means no limit

Get device group list

Basic Information

Path: /bvcsp/v1/bv28181out/group/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching group name, ID
├─ parentid string not necessary Parent group ID

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ ID string Must Group ID
├─ name string Must Group name
├─ parentid string Must Parent group ID, empty indicates root group

Add device group

Basic Information

Path: /bvcsp/v1/bv28181out/group/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
ID string Must Group ID
name string Must Group name
parentid string Must Parent group ID, empty indicates root group

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify device group

Basic Information

Path: /bvcsp/v1/bv28181out/group/:groupid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid group id

Body

name type Is must default value Remark other information
name string Must
parentid string Must

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete device group

Basic Information

Path: /bvcsp/v1/bv28181out/group/:groupid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get device group

Basic Information

Path: /bvcsp/v1/bv28181out/group/:groupid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
groupid

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must title
├─ ID string Must Group ID
├─ name string Must Group name
├─ parentid string Must Parent group ID, empty indicates root group

Get 28181 device list

Basic Information

Path: /bvcsp/v1/bv28181out/device/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching device name, ID, 28181ID
├─ groupid string not necessary
├─ notinusid number not necessary Do not configure the id on the specified upper-level platform, 0: no filtering
├─ status number not necessary 0: All; 1: Online; 2: Not online;

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ puid string Must
├─ gb28181id string Must National standard id
├─ name string Must Device Name
├─ groupid string Must Group ID
├─ online boolean Must online status

Added 28181 devices

Basic Information

Path: /bvcsp/v1/bv28181out/device/create

Method: POST

Interface description:

puid and gb28181id must ensure uniqueness

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
puid string Must Device ID
gb28181id string Must National standard id
name string Must Device Name
groupid string Must Group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify 28181 device

Basic Information

Path: /bvcsp/v1/bv28181out/device/:puid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information
gb28181id string Must National standard ID
name string Must Device Name
groupid string Must Group ID

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete 28181 device

Basic Information

Path: /bvcsp/v1/bv28181out/device/:puid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid device id

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get 28181 device by puid

Basic Information

Path: /bvcsp/v1/bv28181out/device/bypuid/:puid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
puid puid

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object not necessary title
├─ puid string Must
├─ gb28181id string Must National standard id
├─ name string Must Device Name
├─ groupid string Must Group ID
├─ online boolean Must online status

Get 28181 device by 28181 id

Basic Information

Path: /bvcsp/v1/bv28181out/device/by28181id/:gbid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
gbid National standard id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object not necessary title
├─ puid string Must
├─ gb28181id string Must National standard id
├─ name string Must Device Name
├─ groupid string Must Group ID
├─ online boolean Must online status

Add channel information

Basic Information

Path: /bvcsp/v1/bv28181out/channel/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
ID string Must 28181 Channel 20-digit ID
name string Must Channel name
channelNum number Must smarteye platform device channel
deviceId string Must 28181 device id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify channel information

Basic Information

Path: /bvcsp/v1/bv28181out/channel/:channelid

Method: PUT

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
channelid channel id

Body

name type Is must default value Remark other information
name string Must Channel name
channelNum string Must smarteye platform device channel
deviceId string Must 28181 device id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete channel information

Basic Information

Path: /bvcsp/v1/bv28181out/channel/:channelid

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
channelid

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get channel information

Basic Information

Path: /bvcsp/v1/bv28181out/channel/:channelid

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
channelid

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must title
├─ ID string Must 28181 Channel 20-digit ID
├─ name string Must Channel name
├─ channelNum number Must smarteye platform device channel
├─ deviceId string Must 28181 device id

Get 28181 channel list

Basic Information

Path: /bvcsp/v1/bv28181out/channel/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching channel name, ID
├─ deviceId string not necessary 28181 device id

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ ID string Must 28181 Channel 20-digit ID
├─ name string Must Channel name
├─ channelNum number Must smarteye platform device channel
├─ deviceId string Must 28181 device id

Add upper-level platform

Basic Information

Path: /bvcsp/v1/bv28181out/upperserverdevice/create

Method: POST

Interface description:

Add devices to be reported to the specified upper-level platform

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
usid number Must Upper level platform id
puids string[] Must puid list

item type: string

├─ not necessary

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object[] not necessary

item type: object

├─ ID number Must unique id
├─ usid number Must Upper level platform configuration id
├─ puid string Must puid
├─ name string Must Device Name
├─ gb28181id string Must National standard id
├─ online boolean Must online status

Delete upper-level platform device

Basic Information

Path: /bvcsp/v1/bv28181out/upperserverdevice/:id

Method: DELETE

Interface description:

Delete the device to be reported to the specified upper-level platform

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get upper-level platform devices

Basic Information

Path: /bvcsp/v1/bv28181out/upperserverdevice/list

Method: POST

Interface description:

Get the list of devices to be reported to the specified upper-level platform

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object Must
├─ usid string Must Upper level platform configuration id
├─ status number not necessary 0: All; 1: Online; 2: Not online;
├─ match string not necessary Fuzzy matching, puid, national standard id and device name

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
pageInfo object Must Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] Must

item type: object

├─ ID number Must unique id
├─ usid number Must Upper level platform configuration id
├─ puid string Must puid
├─ name string Must Device Name
├─ gb28181id string Must National standard id
├─ online boolean Must online status

28181in

Added 28181 devices

Basic Information

Path: /bvcsp/v1/bv28181in/device/create

Method: POST

Interface description:

puid and gb28181id must ensure uniqueness

deviceType:
    fixedCamera: fixed camera
    ballCamera: ball camera
    ptzCamera : PTZ camera
    bodyCamera: body camera
    smartHelmet : Smart safety helmet
    carCamera: car camera

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
ID string Must 20-digit national standard ID
name string Must Device Name
deviceType string Must Equipment type
mediaStreamProto number Must Media streaming protocol type, 1: udp (default), 2: device as tcp client, 3: device as tcp server
username string Must username
password string Must password
platformID string Must Platform national standard id
enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify 28181 device

Basic Information

Path: /bvcsp/v1/bv28181in/device/:id

Method: PUT

Interface description:

puid and gb28181id must ensure uniqueness

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID National standard id

Body

name type Is must default value Remark other information
name string Must Device Name
deviceType string Must Equipment type
mediaStreamProto number Must Media streaming protocol type, 1: udp, 2: device as tcp client, 3: device as tcp server
username string Must username
password string Must password
enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete 28181 device

Basic Information

Path: /bvcsp/v1/bv28181in/device/:id

Method: DELETE

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID National standard id

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get 28181 device information

Basic Information

Path: /bvcsp/v1/bv28181in/device/:id

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID National standard id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must title
├─ ID string Must 20-digit national standard ID
├─ name string Must Device Name
├─ deviceType string Must Equipment type
├─ mediaStreamProto number Must Media streaming protocol type, 1: udp, 2: device as tcp client, 3: device as tcp server
├─ username string Must username
├─ password string Must password
├─ platformID string Must Platform national standard id
├─ online boolean Must Is online
├─ channels object[] Must

item type: object

├─ ID string Must channel id
├─ name string Must Channel name
├─ index number Must Corresponds to smarteye platform channel index
├─ enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Get 28181 device list

Basic Information

Path: /bvcsp/v1/bv28181in/device/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching device name and ID
├─ platformID string not necessary Platform national standard id
├─ status number not necessary 0: All; 1: Online; 2: Not online;

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ ID string Must 20-digit national standard ID
├─ name string Must Device Name
├─ deviceType string Must Equipment type
├─ mediaStreamProto number Must Media streaming protocol type, 1: udp, 2: device as tcp client, 3: device as tcp server
├─ username string Must username
├─ password string Must password
├─ platformID string Must Platform national standard id
├─ online boolean Must Is online
├─ channels object[] Must

item type: object

├─ ID string Must channel id
├─ name string Must Channel name
├─ index number Must Corresponds to smarteye platform channel index
├─ enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Add 28181 platform

Basic Information

Path: /bvcsp/v1/bv28181in/platform/create

Method: POST

Interface description:

id encoding type, digits 11-13 may be:
    200: Central signaling control server code
    111: DVR encoding
    118: NVR encoding

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
ID string Must 20-digit national standard ID
name string Must name
username string Must username
password string Must password
enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Modify 28181 platform

Basic Information

Path: /bvcsp/v1/bv28181in/platform/:id

Method: PUT

Interface description:

id encoding type, digits 11-13 may be:
    200: Central signaling control server code
    111: DVR encoding
    118: NVR encoding

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Platform id

Body

name type Is must default value Remark other information
name string Must name
username string Must username
password string Must password
enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Delete 28181 platform

Basic Information

Path: /bvcsp/v1/bv28181in/platform/:id

Method: DELETE

Interface description:

id encoding type, digits 11-13 may be:
    200: Central signaling control server code
    111: DVR encoding
    118: NVR encoding

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Platform id

Body

name type Is must default value Remark other information

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description

Get 28181 platform information

Basic Information

Path: /bvcsp/v1/bv28181in/platform/:id

Method: GET

Interface description:

id encoding type, digits 11-13 may be:
    200: Central signaling control server code
    111: DVR encoding
    118: NVR encoding

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID Platform id

Return data

name type Is must default value Remark other information
code number Must result code

mock: 0

msg string Must Result description
data object Must title
├─ ID string Must 20-digit national standard ID
├─ name string Must name
├─ username string Must username
├─ password string Must password
├─ online boolean Must Is online
├─ enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Get 28181 platform list

Basic Information

Path: /bvcsp/v1/bv28181in/platform/list

Method: POST

Interface description:

id encoding type, digits 11-13 may be:
    200: Central signaling control server code
    111: DVR encoding
    118: NVR encoding

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
page number Must Pagination, starting from scratch

mock: 0

pageSize number Must Paging Size

mock: 20

filter object not necessary filter conditions
├─ match string not necessary Fuzzy matching platform name and ID
├─ status number not necessary 0: All; 1: Online; 2: Not online;

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

pageInfo object not necessary Pagination, starting from scratch
├─ page number Must Pagination, starting from scratch

mock: 0

├─ pageSize number Must Paging Size

mock: 20

├─ totalCount number Must Total number of entries

mock: 1000

data object[] not necessary User group list

item type: object

├─ ID string Must 20-digit national standard ID
├─ name string Must name
├─ username string Must username
├─ password string Must password
├─ online boolean Must Is online
├─ enable number Must Whether to enable, 1: Enable, you can go online; 2: Disable enable, prohibit online

Get configuration information

Basic Information

Path: /bvcsp/v1/bv28181in/config

Method: GET

Interface description:

Certification status

type AU_Result int32

const (
   AU_Result_AU_Result_FAIL AU_Result = 0
   AU_Result_AU_Result_Token_Error AU_Result = 1
   AU_Result_AU_Result_Database_Error AU_Result = 2
   AU_Result_AU_Result_Internal_Error              AU_Result = 3
   AU_Result_AU_Result_No_Login AU_Result = 4
   AU_Result_AU_Result_DeSerialize_Fail AU_Result = 5
   AU_Result_AU_Result_Un_Support AU_Result = 6
   AU_Result_AU_Result_DisConnect AU_Result = 7
   AU_Result_AU_Result_Connect_Fail AU_Result = 8
   AU_Result_AU_Result_Server_Busy AU_Result = 9
   AU_Result_AU_Result_Parse_Error AU_Result = 10
   AU_Result_AU_Result_Decrypt_Fail AU_Result = 11
   AU_Result_AU_Result_No_AppInfo AU_Result = 12 // No APP development information
   AU_Result_AU_Result_Not_Found_AppInfo AU_Result = 13
   AU_Result_AU_Result_App_Key_Error AU_Result = 14
   AU_Result_AU_Result_App_Status_Error AU_Result = 15
   AU_Result_AU_Result_Not_Found AU_Result = 16
   AU_Result_AU_Result_No_Trial_Quota AU_Result = 17 //No trial quota
   AU_Result_AU_Result_Trial_Expire                AU_Result = 18 //Trial period expires
   AU_Result_AU_Result_Trial_Timeout AU_Result = 19 //Trial timeout
   AU_Result_AU_Result_Trial_KickOut AU_Result = 20 //Kick offline
   AU_Result_AU_Result_Trail_Deny AU_Result = 21 // Deny trial, not allowed by administrator
   AU_Result_AU_Result_Type_Error AU_Result = 22 //Type error
   AU_Result_AU_Result_No_WriteBack_Times          AU_Result = 23 //  No authentication writeback times (ie: the number to write back authorization based on hardware info has been exhausted)
   AU_Result_AU_RResult_Register_FAIL AU_Result = 51
   AU_Result_AU_RResult_Register_Wait AU_Result = 52
   AU_Result_AU_RResult_Register_Timeout           AU_Result = 53
   AU_Result_AU_RResult_Register_Have_Registed AU_Result = 54 // Already registered
   AU_Result_AU_RResult_Register_No_Cert AU_Result = 55 // No certificate provided
   AU_Result_AU_RResult_Register_Internal_Error AU_Result = 56 // Registration, internal error
   AU_Result_AU_RResult_Register_Not_Original_Cert AU_Result = 57 // Not the original certificate
   AU_Result_AU_Result_Have_Login AU_Result = 101 // A terminal has already logged in using this information
   AU_Result_AU_Result_Cert_State_Error AU_Result = 102 // Certificate status error
   AU_Result_AU_Result_Cert_TimeOut_Error          AU_Result = 103 // Certificate expired
   AU_Result_AU_Result_No_SerialNumber AU_Result = 104 // No device information
   AU_Result_AU_Result_Login_FAIL AU_Result = 105
   AU_Result_AU_Result_Revoke_Authorization AU_Result = 106 // Revoke authorization
   AU_Result_AU_Result_Pause_Authorization AU_Result = 107 // Pause authorization
   AU_Result_AU_Result_Login_Elsewhere AU_Result = 108 // Login elsewhere
   AU_Result_AU_Result_Cert_UseUp                  AU_Result = 109 //Certificate authorization times exhausted
   AU_Result_AU_Result_KeepAlive_No_Token AU_Result = 151 // The server has no token when keeping alive
   AU_Result_AU_Result_KeepAlive_No_Session AU_Result = 152 //The connection does not exist
   AU_Result_AU_Result_Key_State_Error AU_Result = 250 // Product key status error
   AU_Result_AU_Result_Key_Expire AU_Result = 251 // Product key expires
   AU_Result_AU_Result_Key_UseUp AU_Result = 252 //The number of product key authorizations has been exhausted
   AU_Result_AU_Result_OK AU_Result = 1024
   AU_Result_AU_Result_Trail_OK AU_Result = 1025
)

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object not necessary Configuration information
├─ state object Must status information
├─ authResult number Must Certification status
├─ modAuthResult number Must Module authentication status, 0: failed, 1: successful
├─ maxDialogCount number Must Maximum number of channels, 0 means no limit
├─ onlineDeviceCount number Must Current number of online devices
├─ dialogCount number Must Number of currently open channels
├─ info object Must login information
├─ sipServerId string Must Signaling server id
├─ sipPort string Must Signaling port number
├─ mediaPort number Must media port number
├─ outerNetIp string Must External network ip

Create video file download task

Basic Information

Path: /bvcsp/v1/bv28181in/record/task/create

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
fileList string[] not necessary file id list

item type: string

├─ not necessary

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary User group list

item type: object

├─ ID string Must file id
├─ code number Must error code
├─ msg string Must wrong description
├─ percent string Must progress, percentage

Get video file list

Basic Information

Path: /bvcsp/v1/bv28181in/record/list

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
filter object not necessary filter conditions
├─ ID string Must National standard id
├─ startTime number Must Start time, UTC time, accurate to second, filter time range should not exceed one day
├─ endTime number Must End time, UTC time, accurate to seconds
├─ filePath string not necessary file path
├─ type string not necessary Video type

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary User group list

item type: object

├─ ID string Must file id
├─ deviceId string Must National standard id
├─ name string Must file name
├─ filePath string Must file path
├─ address string Must Video address
├─ startTime number Must Start time, UTC time, accurate to seconds
├─ endTime number Must End time, UTC time, accurate to seconds
├─ secrecy number Must Confidentiality attribute (required) defaults to 0; 0: Not confidential, 1: Confidential
├─ type string Must Video generation type (optional) time scheduled storage, alarm alarm storage, manual manual storage
├─ recorderID string Must Recording trigger ID
├─ cachePercent number Must Cache progress, -1 means not cached, 0-100 means cache progress

Get video file download progress

Basic Information

Path: /bvcsp/v1/bv28181in/record/task/query

Method: POST

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

Body

name type Is must default value Remark other information
fileList string[] not necessary file id list

item type: string

├─ not necessary

Return data

name type Is must default value Remark other information
code number Must error code

mock: 0

msg string Must Result description

mock: OK

data object[] not necessary User group list

item type: object

├─ ID string Must file id
├─ code number Must error code
├─ msg string Must wrong description
├─ percent string Must progress, percentage

Video file download

Basic Information

Path: /bvcsp/v1/bv28181in/record/download/:id

Method: GET

Interface description:

Parameters

Headers

parameter name Parameter value Is must Example Remark
Content-Type application/json yes
Authorization yes Token returned successfully by login

path parameters

parameter name Example Remark
ID file id

Return data

name type Is must default value Remark other information

Build by YMFE.