Resource: image
Information about the update image
http://{device}/api/npm.system_update/2.0/images/items/{id}
{ "checksum": string, "id": integer, "progress": number, "state": string, "state_description": string, "version": string }
Property Name | Type | Description | Notes |
---|---|---|---|
image | <object> | Information about the update image | Required properties: [state, state_description]; |
image.checksum | <string> | The SHA-256 checksum of the update image | Optional; |
image.id | <integer> | A unique identifier for the image | Read-only; Optional; |
image.progress | <number> | The progress of the current upload/fetch operation | Optional; |
image.state | <string> | The state of the update image | Values: UPLOADING, VALIDATING, UPLOAD_ERROR, VALID, INVALID; |
image.state_description | <string> | A more detailed description of the state | |
image.version | <string> | The version of the update image | Optional; |
Links
image: delete
DELETE http://{device}/api/npm.system_update/2.0/images/items/{id}Response Body
On success, the server does not provide any body in the responses.
image: get
GET http://{device}/api/npm.system_update/2.0/images/items/{id}Response Body
Returns an image data object.
Resource: images
List of update images
http://{device}/api/npm.system_update/2.0/images
{ "items": [ image ] }
Property Name | Type | Description | Notes |
---|---|---|---|
images | <object> | List of update images | |
images.items | <array of <image>> | An array containing the available update images | Optional; |
images.items[items] | <image> | Information about the update image |
Links
images: fetch
Fetch a new update image at the provided url
POST http://{device}/api/npm.system_update/2.0/images/fetchRequest Body
Provide a request body with the following structure:
{ "url": string }
Property Name | Type | Description | Notes |
---|---|---|---|
images.links.fetch.request | <object> | Fetch parameters | Required properties: [url]; |
images.links.fetch.request.url | <string> | The url where to fetch the update image from |
Returns an image data object.
images: get
GET http://{device}/api/npm.system_update/2.0/imagesResponse Body
Returns an images data object.
images: upload
Uploads a new update image. The accepted content-type is application/octet-stream.
POST http://{device}/api/npm.system_update/2.0/images/uploadRequest Body
Provide a request body with the following structure:
{ <prop>: any }
Property Name | Type | Description | Notes |
---|---|---|---|
images.links.upload.request | <object> | The update image binary | |
images.links.upload.request.<prop> | <any> | Optional; |
Returns an image data object.
Resource: update
The overall status of the update
http://{device}/api/npm.system_update/2.0/update
{ "last_state_time": integer, "state": string, "state_description": string, "target_version": string, "update_history": [ { "time": integer, "version": string } ] }
Property Name | Type | Description | Notes |
---|---|---|---|
update | <object> | The overall status of the update | Required properties: [state, state_description, last_state_time, update_history]; |
update.last_state_time | <integer> | The time of the last state transition, in Unix epoch seconds | |
update.state | <string> | The state of the update | Values: IDLE, INITIALIZING, INITIALIZED, RUNNING, FAILED_GRACEFUL, FAILED_CRITICAL; |
update.state_description | <string> | A more detailed description of the state | |
update.target_version | <string> | The version the system will be updated to | Optional; |
update.update_history | <array of <object>> | A list of past updates. The first element of the list is an installation | |
update.update_history[items] | <object> | Information about a previous update | |
update.update_history[items].time | <integer> | The time of the update, in Unix epoch seconds | Optional; |
update.update_history[items].version | <string> | The version that was installed | Optional; |
Links
update: get
GET http://{device}/api/npm.system_update/2.0/updateResponse Body
Returns an update data object.
update: init
Initialize the update process. Must be called before the update can be started.
POST http://{device}/api/npm.system_update/2.0/update/initRequest Body
Do not provide a request body.
Response BodyOn success, the server does not provide any body in the responses.
update: reset
Uninitialize the update process
POST http://{device}/api/npm.system_update/2.0/update/resetRequest Body
Do not provide a request body.
Response BodyOn success, the server does not provide any body in the responses.
update: start
Start the update process
POST http://{device}/api/npm.system_update/2.0/update/startRequest Body
Do not provide a request body.
Response BodyOn success, the server does not provide any body in the responses.