Set

Function

This API is used to set IPC ftp update parameters.

Request Message

Parameter Description

Table 1
ParameterRangeTypeDescription
ftp_auto_upgradeboolFtp auto upgrade IPC switch.
check_for_updatesboolFtp automatic upgrade IPC prompt switch.
online_upgradeboolA new interface for judging whether to use FTP or HTTP to upgrade IPC online.
channel_infoobjectTotal channel information object, see Table 2 for detailed information.
Table 2
ParameterRangeTypeDescription
CH1objectA channel information object, see Table 3 for details.
...object
IP_CH1object
...object
WIFI_CH1object
...object
Table 3
ParameterRangeTypeDescription
sup_ftp_auto_upgradeboolWhether the IPC supports automatic upgrade.
ftp_ipc_new_verboolWhether there is a new version of IPC.
upgrade_resultlen:0-32stringupgrade result.
reasonstringThe reason why IPC cannot obtain information.

Tips:

The response message of the Set request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

POST /API/IPCMaintaint/FtpIpcUpgrade/Set HTTP/1.1
{
    "version":"1.0",
    "data":{
        "online_upgrade":true,
        "ftp_auto_upgrade":false,
        "check_for_updates":false,
        "channel_info":{
            "CH3":{
                "reason":"Not support"
            },
            "CH7":{
                "reason":"Not support"
            },
            "CH8":{
                "sup_ftp_auto_upgrade":true,
                "upgrade_result":"cannot_upgrade",
                "ftp_ipc_new_ver":false
            },
            "CH10":{
                "reason":"Not support"
            },
            "CH11":{
                "sup_ftp_auto_upgrade":false
            },
            "CH14":{
                "reason":"Not support"
            },
            "CH15":{
                "sup_ftp_auto_upgrade":true,
                "upgrade_result":"cannot_upgrade",
                "ftp_ipc_new_ver":false
            },
            "CH16":{
                "sup_ftp_auto_upgrade":true,
                "upgrade_result":"",
                "ftp_ipc_new_ver":false
            }
        }
    }
}

Response Message

None.

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.