Create a firmware file for a product.
This API is available in EnOS 2.2.0 and above.
Operation Permissions
Before invoking this API, ensure that the service account has been authorized the policy that includes the following service(s) and action permission(s). For how to authorize the service account, see Managing Service Accounts.
Required Service |
Required Operation Permission |
Firmware |
Create |
Request Parameters (Body)
The format of the request body is multipart/form-data, which consists of two form-data sections:
- Firmware metadata form-data
- Firmware file form-data
Header of the firmware metadata form-data
Name |
Mandatory/Optional |
Data Type |
Description |
Content-Disposition |
Mandatory |
Content-Disposition: form-data; name=”metadata” |
name is a constant that indicates the name of the metadata message. |
Body of the firmware metadata form-data
Name |
Mandatory/Optional |
Data Type |
Description |
name |
Mandatory |
StringI18n |
The firmware name. Note that no repetitive firmware names are allowed under the same product. For more details on the structure and locales supported, see Internationalized name struct. |
version |
Mandatory |
String |
The firmware version. |
signMethod |
Mandatory |
String |
The signature algorithm for the firmware files, supports md5 and sha256 . |
sign |
Mandatory |
String |
The fimware file signature. |
desc |
Optional |
String |
The firmware description. |
enableVerification |
Mandatory |
Boolean |
Specifies whether the firmware must be verified for upgrading tasks.
true : Needs to be verified.
false : Does not need to be verified.
|
firmwareTags |
Optional |
Map (Key and Value are of String type) |
The firmware tags. The key must be unique for each firmware. For details, see How to use tags. |
maxAllowedForVerification |
Optional |
Integer |
The maximum number of devices to be used to verify the firmware. The number must be greater than or equals to 1. |
minSuccessForVerified |
Optional |
Integer |
The minimum number of successfully verified devices to pass the firmware verfication job. The number must be greater than or equals to 1, and must not be larger than maxAllowedForVerification . |
Header of the firmware file form-data
Name |
Mandatory/Optional |
Data Type |
Description |
Content-Disposition |
Mandatory |
Content-Disposition: form-data; name=”file”; filename=”yourFileName” |
name is a constant that indicates the name of the metadata message. filename is the filename corresponding to the firmware. |