Downloading the Software
Function
Delivers a message for downloading MEF Edge. You need to configure the address, account, and password of a third-party software repository and then download the prepared software to be upgraded from the third-party software repository.
Syntax
Operation type: POST
URL: https://{ip}:{port}/edgemanager/v1/software/edge/download
{
"serialNumbers": ["2102312NSF10K8000130"],
"softwareName": "MEFEdge",
"downloadInfo": {
"package": "GET https://xxx.tar.gz",
"signFile": "GET https://xxx.tar.gz.cms",
"crlFile": "GET https://xxx.tar.gz.crl",
"userName": "FileTransferAccount",
"password": [xx,yy,zz,ww]
}
}
Request Parameters
Parameter |
Mandatory/Optional |
Description |
Value |
|---|---|---|---|
serialNumbers |
Mandatory |
Device SN |
Array with a maximum length of 64 bytes, which can contain lowercase letters, uppercase letters, digits, underscores (_), and hyphens (-). The value cannot start or end with an underscore (_) or hyphen (-). The value contains 1 to 2048 characters. |
softwareName |
Mandatory |
Name of the software to be downloaded |
The value must be MEFEdge. |
downloadInfo |
Mandatory |
Download information |
File download information of the software repository. The versions of package, signFile, and crlFile in the request must match. |
package |
Mandatory |
Software package |
The value is a character string. The URL can contain a maximum of 512 bytes and cannot contain special characters such as "\n!\\|;$<>@` ". The protocol must be HTTPS and the request mode must be GET. NOTE:
|
signFile |
Mandatory |
Software package and signature file |
The value is a character string. The URL can contain a maximum of 512 bytes and cannot contain special characters such as "\n!\\|;$<>@` ". The protocol must be HTTPS and the request mode must be GET. NOTE:
|
crlFile |
Mandatory |
CRL of the software package |
The value is a character string. The URL can contain a maximum of 512 bytes and cannot contain special characters such as "\n!\\|;$<>@` ". The protocol must be HTTPS and the request mode must be GET. NOTE:
|
userName |
Mandatory |
Account for software download |
The value is a string of 6 to 32 characters and can contain only lowercase letters, uppercase letters, and digits. |
password |
Mandatory |
Password for software download |
Byte array. The delivered information must contain the password. The array length ranges from 8 to 20. NOTE:
The password must meet the following requirements; otherwise, security risks may exist.
|
Usage Example
Request:
POST https://10.10.10.10:30035/edgemanager/v1/software/edge/download
{
"serialNumbers": ["xxxxxxxxx"],
"softwareName": "MEFEdge",
"downloadInfo": {
"package": "GET https://xxx.tar.gz",
"signFile": "GET https://xxx.tar.gz.cms",
"crlFile": "GET https://xxx.tar.gz.crl",
"userName": "FileTransferAccount",
"password": [xx,yy,zz,ww]
}
}
{
"status": "00000000",
"msg": "success",
"data": {
"failedInfos": {},
"successIDs": [
"xxxxxxxxx"
]
}
}
Response status code: 200
Output Description
Parameter |
Type |
Description |
|---|---|---|
status |
String |
Error code |
msg |
String |
Description |
data |
Object |
- |
Parameter |
Type |
Description |
|---|---|---|
successIDs |
String list |
IDs that successfully download the software. |
failedInfos |
Hash table. The key and value are character strings. |
key is the IDs that fail to download the software, and value is the failure cause. |