AIPCAM-G2 API Document(en)
  1. 3.2 Customised platform
AIPCAM-G2 API Document(en)
  • 0 Login
    • User Login
      POST
    • Modify Password
      POST
  • 1 System Settings
    • 1.1 System Infomation
      • 1.1.1 Getting System Information
      • 1.1.2 Setting System Information
    • 1.2 System Time
      • 1.2.1 Getting System Time
      • 1.2.2 Setting System Time
    • 1.3 System Maintenance
      • 1.3.1 Getting System Maintenance Status
      • 1.3.2 Setting System Maintenance Status
    • 1.4 Universal Asynchronous Receiver/Transmitter(UART)
      • 1.4.1 Getting UART Parameters
      • 1.4.2 Setting UART Parameters
    • 1.5 General-purpose input/output(GPIO)
      • 1.5.1 Getting GPIO Parameters
      • 1.5.2 Setting GPIO Parameters
    • 1.6 System Reboot
      • 1.6.1 Device Reboot
    • 1.7 System Reset
      • 1.7.1 Restoring Configuration Only
      • 1.7.2 Restore Factory Settings
    • 1.8 System Memory
      • 1.8.1 System Memory Query
    • 1.9 System Update
      • 1.9.1 Chunked Uploading
      • 1.9.2 End Uploading
    • 1.10 RS485
      • 1.10.1 Getting RS485
      • 1.10.2 Setting RS485
  • 2 Network Settings
    • 2.1 TCP/IP
      • 2.1.1 Getting IP
      • 2.1.2 Setting IP
    • 2.2 4G Network
      • 2.2.1 Getting 4G Network Parameters
      • 2.2.2 Setting 4G Network Parameters
    • 2.3 Wi-Fi Network
      • 2.3.1 Getting Wi-Fi AP Network
      • 2.3.2 Setting Wi-Fi AP Network
      • 2.3.3 Getting Wi-Fi STA Network
      • 2.3.4 Setting Wi-Fi STA Network
      • 2.3.5 Connecting Wi-Fi STA Network
      • 2.3.6 Getting Wi-Fi STA Netwok List
  • 3 Platform Settings
    • 3.1 GB-T28181
      • 3.2.1 Getting GB-T28181 Parameters
      • 3.1.2 Setting GB-T28181 Parameters
    • 3.2 Customised platform
      • 3.3.1 Getting Customized Platform Alarm
        POST
      • 3.2.2 Setting Customized Platform Alarm
        POST
      • 3.2.3 Getting Customized Platform Notification
        POST
      • 3.2.4 Setting Customized Platform Notification
        POST
    • 3.3 File Transfer Protocol (FTP)
      • 3.4.1 Getting FTP Parameters
      • 3.4.2 Setting FTP Parameters
    • 3.4 Open Network Video Interface Forum(ONVIF)
      • 3.4.1 Getting ONVIF Parameters
      • 3.4.2 Setting ONVIF Parameters
    • 3.5 Real Time Streaming Protocol (RTSP)
      • 3.7.1 Getting RTSP Parameters
      • 3.7.2 Setting RTSP Parameters
  • 4 Video Settings
    • 4.1 Video Channel Encode
      • 4.1.1 Getting Encoding Parameters
      • 4.1.2 Setting Encoding Parameters
    • 4.2 Video Channel OSD
      • 4.2.1 Getting OSD Parameters
      • 4.2.2 Setting OSD Parameters
    • 4.3 ISP
      • 4.3.1 Getting ISP Parameters
      • 4.3.2 Setting ISP Parameters
    • 4.4 Day/Night Switching
      • 4.4.1 Getting Day/Night Switching Parameters
      • 4.4.2 Setting Day/Night Switching Parameters
    • 4.5 Lens Distortion Correction(LDC)
      • 4.5.1 Getting LDC Parameters
      • 4.5.2 Setting LDC Parameters
    • 4.6 Channel Rotation
      • 4.6.1 Getting Channel Rotation
      • 4.6.2 Setting Channel Rotation
    • 4.7 Screen Flip
      • 4.8.1 Getting Screen Flip
      • 4.8.2 Setting Screen Flip
    • 4.8 Snapshot
      • 4.9.1 Getting Snapshot
  • 5 Audio Settings
    • 5.1 Audio Encoding
      • 5.1.1 Getting Encoding Parameters
      • 5.1.2 Setting Encoding Parameters
    • 5.2 Audio Input/Output
      • 5.2.1 Getting Input/Output Status
      • 5.2.2 Setting Input/Output
    • 5.3 Audio File
      • 5.3.6 Uploading Audio File
        • 5.3.6.1 Chunked Uploading
        • 5.3.6.2 Ending Uploading
      • 5.3.1 Getting Audio Files
      • 5.3.2 Setting Audio File
      • 5.3.3 Deleting Audio File
      • 5.3.4 Emptying Audio Files
      • 5.3.5 Playing Audio File On Device
  • 6 Intelligent Settings
    • 6.1 Detection Model
      • 6.1.5 Uploading Model
        • 6.1.5.1 Chunked Uploading
        • 6.1.5.2 Ending Uploading
      • 6.1.1 Getting Model List
      • 6.1.2 Enabling Model
      • 6.1.3 Deleting Model
      • 6.1.4 Emptying model
    • 6.2 Detection Parameters
      • 6.2.1 Getting Detection Parameters
      • 6.2.2 Setting Detection Parameters
    • 6.3 Detection Result
      • 6.3.1 Getting Detection Result
    • 6.4 Model Tags
      • 6.4.1 Getting Model Tag
      • 6.4.2 Setting Model Tag
  • 7 Alarm Settings
    • 7.1 Global Alarm Parameters
      • 7.1.1 Getting Alarm Parameters
      • 7.1.2 Setting Alarm Parameters
    • 7.2 Arming Plan
      • 7.2.1 Getting Plan
      • 7.2.2 Setting Plan
      • 7.2.3 Adding Plan
      • 7.2.4 Deleting Plan
      • 7.2.5 Emptying Plan
    • 7.3 Alarm Region
      • 7.3.1 Getting Alarm Parameters
      • 7.3.2 Setting Alarm Parameters
      • 7.3.3 Getting Alarm Region List
      • 7.3.4 Setting Alarm Region
      • 7.3.5 Adding Alarm Region
      • 7.3.6 Deleting Alarm Region
      • 7.3.7 Emptying Alarm Region
    • 7.4 Crossing Statistics
      • 7.4.1 Getting Crossing Statistics Parameters
      • 7.4.2 Setting Crossing Statistics Parameters
      • 7.4.3 Getting Statistical Lines
      • 7.4.4 Setting Statistical Lines
      • 7.4.5 Adding Statistical Line
      • 7.4.6 Deleting Statistical Line
      • 7.4.7 Emptying Statistical Line
  • 8 Record Settings
    • 8.1 Basic Parameters
      • 8.1.1 Getting Basic Parameters
      • 8.1.2 Setting Basic Parameters
    • 8.2 Recording Settings
      • 8.2.1 Getting Recording Status
      • 8.2.2 Start Recording
      • 5.2.2 Stop Recording
    • 8.3 Recording Plan
      • 8.3.1 Getting Recoding Plan
      • 8.3.2 Setting Recording Plan
      • 8.3.3 Adding Recording Plan
      • 8.3.4 Deleting Recording Plan
      • 8.3.5 Emptying Recording Plan
    • 8.4 Recoding Files
      • 8.4.1 Getting Recording Files
      • 8.4.2 Recording Self-check
      • 8.4.3 Deleting Files In Batch
      • 8.4.4 Emptying Files In Need
      • 8.4.5 Downloading File
    • 8.5 Recording Space
      • 8.5.1 Recording Space Query
      • 8.5.2 Recording Space Format
  • 9 Pan/Tilt/Zoom(PTZ) Settings
    • 9.1 PTZ Command
      • 9.1.1 Stop Command
      • 9.1.2 Gimbal Command
      • 9.1.3 Focus/Focused/Iris commands
      • 9.1.4 Preset Command
      • 9.1.5 Getting Focus Status
    • 9.2 Cruise Settings
      • 9.2.1 Getting Cruise Function
      • 9.2.2 Setting Cruise Function
      • 9.2.3 Setting Cruise Path
  • Appendix
    • Appendix 1: Status Code Description
    • Appendix 2: RTSP Streaming Instructions
  1. 3.2 Customised platform

3.2.2 Setting Customized Platform Alarm

POST
/api/network/config

Request

Cookie Params
access_token
string 
required
Default:
{{access_token}}
Body Params application/json
id
string 
required
op
string 
required
data
object 
required
enable
integer 
required
Enable or disable
url
string 
required
server interface address
extend_header
string 
required

HttpHeader( The format is: xxx:space + xxxx, example Authorization: Bearer <token_value>)

msg_type
integer 
required
essage type,0: x-www-form-urlencoded 1: json 2: image/jpeg
date_format
string 
required
date format,example:%Y-%m-%d %H:%M:%S
msg_frame
integer 
required
message type 0-default 1-customized
msg_format
string 
required
Message format when the camera actively pushes alarms
JSON格式
"{"device_id":"((DEVICE_ID))","device_version":"((DEVICE_VERSION))","date":"((DATE_FORMAT))","timestamp":((TIMESTAMP)),"label":"((LABEL))","alias":"((ALIAS))","count":((COUNT)),"img_base64":"((BASE64_IMAGE))","extend":{((EXTEND))}}"
x-www-form-urlencoded格式
"device_id=((DEVICE_ID))&device_version=((DEVICE_VERSION))&date=((DATE_FORMAT))&timestamp=((TIMESTAMP))&label=((LABEL))&alias=((ALIAS))&count=((COUNT))&img_base64=((BASE64_IMAGE))&extend={((EXTEND))}"
如果不需要某字段,可去掉该键值对,键值对的key名可自定义,value名为正则项不可更改。
msg_format explantion
object 
optional
The format of the alarm message received by the server, for illustration purposes only, there is no need to carry this field during setup
Example
{
    "id": "GSF_ID_IOT_CUSTOM",
    "op": "G1C0S0",
    "data": {
        "url": "http://0.0.0.0:80/api",
        "extend_header": "",
        "msg_type": 1,
        "date_format": "%Y-%m-%d %H:%M:%S",
        "msg_format": "{\"device_id\":\"((DEVICE_ID))\", \"device_version\":\"((DEVICE_VERSION))\",\"date\":\"((DATE_FORMAT))\",\"timestamp\":((TIMESTAMP)), \"label\":\"((LABEL))\", \"alias\":\"((ALIAS))\",\"count\":((COUNT)),\"img_base64\":\"((BASE64_IMAGE))\",\"extend\":{((EXTEND))}}",
        "enable": 0
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://192.168.0.168/api/network/config' \
--header 'Cookie: access_token=;access_token=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "GSF_ID_IOT_CUSTOM",
    "op": "G1C0S0",
    "data": {
        "url": "http://0.0.0.0:80/api",
        "extend_header": "",
        "msg_type": 1,
        "date_format": "%Y-%m-%d %H:%M:%S",
        "msg_format": "{\"device_id\":\"((DEVICE_ID))\", \"device_version\":\"((DEVICE_VERSION))\",\"date\":\"((DATE_FORMAT))\",\"timestamp\":((TIMESTAMP)), \"label\":\"((LABEL))\", \"alias\":\"((ALIAS))\",\"count\":((COUNT)),\"img_base64\":\"((BASE64_IMAGE))\",\"extend\":{((EXTEND))}}",
        "enable": 0
    }
}'

Responses

🟢200成功
application/json
Body
code
integer 
required
data
object 
required
Example
{
    "code": 0,
    "data": {}
}
Modified at 2024-12-27 07:42:14
Previous
3.3.1 Getting Customized Platform Alarm
Next
3.2.3 Getting Customized Platform Notification
Built with