Software Updatable API

The software updatable service utilizes the Eclipse hawkBit message format to install a specified list of containers (software modules) and remove already installed modules.

Install

You can install a specified list of containers (software modules).

Request

Hono Command: command//<name>:<namespace>:edge:containers/req//install

Ditto Message:

NameValueDescription
topic<name>/<namespace>:edge:containers/things/live/messages/installInformation about the affected Thing and the type of operation
path/features/SoftwareUpdatable/inbox/messages/installA path to the SoftwareUpdatable Feature, it’s message channel, and install command
HeadersAdditional headers
response-requiredtrue/falseIf response is required
content-typeapplication/jsonThe content type
correlation-idcontainer UUIDThe container UUID
Value
correlationIdUnique identifier that is used to associate and track the series of messages
weightThe weight is the priority in case of multiple, parallel instructions
metadataThe metadata is any other information which should be passed to the device
forcedtrue/falseForced to install the software modules
softwareModulesAn array of modules that will be installed
metadataThe metadata is any other information which should be passed to the device
softwareModuleAn unique identifier for the software module
nameThe name of the software module
versionThe version of the software module
artifactsAn array of artifacts contained in the software module
filenameThe file name of the artifact behind the provided URLs
sizeThe size of the file in bytes
downloadA map with protocols and links for artifact download
keyHTTP/HTTPS/FTP/SFTPAvailable transport protocols
urlURL to download the artifact
md5urlMD5URL to download the MD5SUM file
checksumsA map with checksums to verify the proper download
MD5MD5 checksum of the downloaded file
SHA1SHA1 checksum of the downloaded file
SHA256SHA256 checksum of the downloaded file

Example : In this example, you can install the listed modules.

Topic: command//edge:device:edge:containers/req//install

{
	"topic":"edge/device:edge:containers/things/live/messages/install",
	"headers":{
		"response-required":true,
		"content-type":"application/json",
		"correlation-id":"<UUID>"
	},
	"path":"/features/SoftwareUpdatable/inbox/messages/install",
	"value":{
		"correlationId":"other_correlation_id",
		"forced":true,
		"softwareModules":[
			{
				"softwareModule":{
					"name":"influxdb",
					"version":"1.8.4"
				},
				"artifacts":[
					{
						"filename":"valid.json",
						"download":{
							"HTTPS":{
								"url":"https://raw.githubusercontent.com/eclipse-kanto/container-management/main/containerm/pkg/testutil/config/container/valid.json",
								"md5url":"https://raw.githubusercontent.com/eclipse-kanto/container-management/main/containerm/pkg/testutil/config/container/valid.json"
							}
						},
						"checksums":{
							"MD5":"8c5a0fa2c01e218262d672bf643652fd",
							"SHA1":"7539b451d818d94bcd97d401a5467b3e1c0b8981",
							"SHA256":"be8f5def8e6a61caab078be0995826ae65f5993b1a35c18ed6045c3db37c4a3a"
						},
						"size":100
					}
				]
			}
		]
	}
}
Response

Hono Command : command//<name>:<namespace>:edge:containers/res//install

Ditto Message:

NameValueDescription
topic<name>/<namespace>:edge:containers/things/live/messages/installInformation about the affected Thing and the type of operation
path/features/SoftwareUpdatable/outbox/messages/installA path to the SoftwareUpdatable Feature, it’s message channel, and install command
HeadersAdditional headers
content-typeapplication/jsonThe content type
correlation-id<UUID>The same correlation id as the sent request message
StatusStatus of the install operation`

Example : Response of a successful install of the software modules.

Topic: `command//edge:device:edge:containers/res//install``

{
	"topic":"edge/device:edge:containers/things/live/messages/install",
	"headers":{
		"content-type":"application/json",
		"correlation-id":"<UUID>"
	},
	"path":"/features/SoftwareUpdatable/outbox/messages/install",
	"status": 204
}

Remove

Remove of an installed software module.

Request

Hono Command: command//<name>:<namespace>:edge:containers/req//remove

Ditto Message:

NameValueDescription
topic<name>/<namespace>:edge:containers/things/live/messages/removeInformation about the affected Thing and the type of operation
path/features/SoftwareUpdatable/inbox/messages/removeA path to the SoftwareUpdatable Feature, it’s message channel, and remove command
HeadersAdditional headers
response-requiredtrue/falseIf response is required
content-typeapplication/jsonThe content type
correlation-idcontainer UUIDThe container UUID
ValueJson presentation of the software module to be removed
correlationIdUnique identifier that is used to associate and track the series of messages
weightThe weight is the priority in case of multiple, parallel instructions
metadataThe metadata is any other information which should be passed to the device
forcedtrue/falseForce remove the software modules
softwareAn array of software modules to be removed
groupAn identifier which groups the dependency into a certain category
nameThe dependency name
versionThe dependency version
typeThe “category” classifier of the dependency

Example : In this example, you can remove an existing software modules.

Topic: command//edge:device:edge:containers/req//remove

{
	"topic":"edge/device:edge:containers/things/live/messages/remove",
	"headers":{
		"response-required":true,
		"content-type":"application/json",
		"correlation-id":"<UUID>"
	},
	"path":"/features/SoftwareUpdatable/inbox/messages/remove",
	"value": {
		"correlationId":"other_correlation_id",
		"forced":true,
		"software":[
			{
				"name":"influxdb",
				"version":""
			}
		]
	}
}
Response

Hono Command : command//<name>:<namespace>:edge:containers/res//remove

Ditto Message:

NameValueDescription
topic<name>/<namespace>:edge:containers/things/live/messages/removeInformation about the affected Thing and the type of operation
path/features/SoftwareUpdatable/outbox/messages/removeA path to the SoftwareUpdatable Feature, it’s message channel, and remove command
HeadersAdditional headers
correlation-idcontainer UUIDThe container UUID
StatusStatus of the operation remove software modules from container

Example : The response of successful removal of software modules.

Topic: `command//edge:device:edge:containers/res//remove``

{
	"topic":"edge/device:edge:containers/things/live/messages/remove",
	"headers":{
		"correlation-id":"<UUID>"
	},
	"path":"/features/SoftwareUpdatable/outbox/messages/remove",
	"status":204
}
Last modified June 28, 2024