Import

Function

This API is used to import alert audio files.

Request Message

Parameter Description

Table 1
ParameterRangeTypeDescription
channel"CH1"…"CHx",
"IP_CH1"…"IP_CHx",
"WIFI_CH1"…"WIFI_CHx"
Channels supported by the device.
string array
channel_infoobjectTotal channel information see Table 2.
Table 2
ParameterRangeTypeDescription
CH1objectSee Table 3
object
IP_CH1object
object
WIFI_CH1object
object
Table 3
ParameterRangeTypeDescription
siren_type"Alarm1",
"Alarm2",
"User-defined1",
"User-defined2",
"User-defined3"
stringAlarm alarm station Choose Audio.
siren_file_namestring length: 0-127stringalarm file name.
siren_file_typestring length: 0-127stringAudio file type.
file_datastring length: 0-512kstringfile data.
file_namestring length: 0-127stringfile name.

Sample:

POST /API/AlarmConfig/VoiceAlarm/Import HTTP/1.1
{
    "version": "1.0",
    "data": {
        "channel_info": {
            "CH1": {
                "siren_type": "Alarm1",
                "siren_file_name": "FILE.wav",
                "siren_file_type": ".wav",
                "file_data": "ADSD+ASD.ADASD"
            }
        }
    }
}

Response Message

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {}
}

Error Code

See Response Messages Body and Common error_code for more information.