5.2.3 api firmware reject

The api/firmware/reject function rejects the uploaded firmware file.

Methods
  • GET

  • POST

Services and Privileges
  • Services: System API

  • Privileges: System Control


Request PUT

The request contains a file in URL.


Table 1. Request Parameters
ParameterMandatoryExpected ValuesDefault ValueDescription

fileId

Yes

Firmware file identifier

-

This parameter has to correspond to the identifier of the currently uploaded firmware file.


Example of a GET or POST Request

http://192.168.1.1/api/firmware/reject?fileId=7d6adf16


Response to GET or POST

The response is in the application/json format. The response contains success. If success is true, the firmware is rejected and it is possible to upload a new firmware file using api/firmware.


Example of a Response to GET or POST

{ "success" : true }

The following specific error codes may be returned:

  • Error code 12
  • parameter = "fileId"

  • description = "invalid parameter"

  • The file identifier is invalid (e.g. contains non-HEX characters).

  • Error code 14
  • description = "new firmware not found"

  • There is no firmware file uploaded with such fileId. 

Note

  • The device does not reply to the api/firmware requests to upload another firmware version when the previous firmware file is present. Use api/firmware/reject to reject the previous firmware first and then upload another firmware version. The uploaded firmware file is automatically rejected in 5 minutes if not applied.