Firmware Upgrade via NBI
To upgrade device firmware via NBI, follow these steps:
-
For each device, create a firmware upgrade campaign with the firmware file hosted on the integrated file server.
-
Send a CNR (Connection Request) to each device for which the upgrade campaign has been created.
-
Check the firmware upgrade completion status.
-
Optionally, remove or deactivate the firmware upgrade rule for these devices.
HTTP Requests
The following HTTP requests should be executed in the given order:
- Create Upgrade Rule:
POST /v1/dyn/FirmwareStorage/.* HTTP/1.1
Host: <actual host>
Content-Type: application/json
Authorization: Basic YmFzZTY0OmVuY29kZWQK
Content-Length: <actual length>
{
"id": "UPGRADE_<cpeid>",
"enabled": true,
"automatic": true,
"file": "<target file URL>",
"condition": {
"cpeid": "<cpeid>"
},
"executions": 1,
"priority": 1,
"author": "api"
}
- Send Connection Request:
POST /v1/method/SendCNR HTTP/1.1
Host: <actual host>
Content-Type: application/json
Authorization: Basic YmFzZTY0OmVuY29kZWQK
Content-Length: <actual length>
{
"search_options": {
"cpe_id": "DMS_DEVICE"
}
}
- Get Firmware Upgrade Result:
GET /v1/dyn/FirmwareResultStorage/.*?id=UPGRADE_<cpeid> HTTP/1.1
Host: <actual host>
Authorization: Basic YmFzZTY0OmVuY29kZWQK
- Deactivate Upgrade Rule:
PUT /v1/dyn/FirmwareStorage/.*?campaignid=UPGRADE_<cpeid> HTTP/1.1
Host: <actual host>
Content-Type: application/json
Authorization: Basic YmFzZTY0OmVuY29kZWQK
Content-Length: <actual length>
{
"id": "UPGRADE_<cpeid>",
"enabled": false,
"automatic": false
}
Example API Responses
Successful upgrade rule creation:
{
"code": 204,
"message": "response from FirmwareStorage",
"details": ""
}
Connection request successfully sent:
{
"result": {
"code": 200,
"message": "OK"
}
}
Upgrade result not found:
{
"code": 404,
"message": "response from FirmwareResultStorage",
"details": ""
}
Upgrade result found (upgrade incomplete or failed):
{
"code": 200,
"message": "response from FirmwareResultStorage",
"details": [
{
"id": "cd3627cd-1908-4ff8-8fe3-f7078723a684",
"status": true,
"ts": 1743412508,
"cpeid": "<cpeid>",
"rule_description": "string",
"campaignid": "UPGRADE_<cpeid>",
"result": {
"code": 500,
"message": "Upgrade has failed with FaultCode 9010. FaultString: Download failure. File not found."
}
}
]
}
Rule successfully updated:
{
"code": 204,
"message": "response from FirmwareStorage",
"details": ""
}