Software Updatable API

The software updatable service provides the ability to install given list of software modules and to download modules.

Install

Install given list of software modules.

Request

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

Ditto Message:

NameValueDescription
topic<name>/<namespace>/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-idUUIDUsed for correlating protocol messages, the same correlation-id as the response message
ValueJSON presentation of software module that will be installed
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 remove the software modules
softwareModulesAn array of software modules to 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
sizeArtifact file size in bytes
downloadA map with protocols and links for downloading the artifacts
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
SHA1MD5 checksum
SHA256MD5 checksum

Example : Install a hello-world software module.

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

{
	"topic":"edge/device/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",
		"softwareModules":[
			{
				"softwareModule":{
					"name":"install-hello",
					"version":"1.0.0"
				},
				"artifacts":[
					{
						"checksums":{
							"SHA256":"db954c633393c1402f145a60fd58d312f5af96ce49422fcfd6ce42a3c4cceeca",
							"MD5":"8c5a0fa2c01e218262d672bf643652fd",
							"SHA1":"7539b451d818d94bcd97d401a5467b3e1c0b8981"
						},
						"download":{
							"HTTPS":{
								"url":"https://github.com/eclipse-kanto/kanto/raw/main/quickstart/install_hello.sh"
							}
						},
						"filename":"install.sh",
						"size":544
					}
				]
			}
		]
	}
}
Response

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

Ditto Message:

NameValueDescription
topic<name>/<namespace>/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 operation install software modules

Example : The response of the install software modules operation.

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

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

Download

Download software modules.

Request

Hono Command: command//<name>:<namespace>/req//download

Ditto Message:

NameValueDescription
topic<name>/<namespace>/things/live/messages/downloadInformation about the affected Thing and the type of operation
path/features/SoftwareUpdatable/inbox/messages/downloadA path to the SoftwareUpdatable Feature, it’s message channel, and download command
HeadersAdditional headers
response-requiredtrue/falseIf response is required
content-typeapplication/jsonThe content type
correlation-idUUIDUsed for correlating protocol messages, the same correlation-id as the sent back response message
ValueJSON representation of the software modules that will be downloaded
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/falseRemove the software modules forcefully
softwareModulesAn array of software modules that will be downloaded
metadataThe metadata is any other information which should be passed to the device
softwareModuleA 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
sizeArtifact file size in bytes
downloadA map with protocols and links for downloading the artifacts
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
SHA1MD5 checksum
SHA256MD5 checksum

Example : Download a hello-world software module.

Topic: command//edge:device/req//download

{
	"topic":"edge/device/things/live/messages/download",
	"headers":{
		"response-required":true,
		"content-type":"application/json",
		"correlation-id":"<UUID>"
	},
	"path":"/features/SoftwareUpdatable/inbox/messages/download",
	"value": {
		"correlationId":"other_correlation_id",
        "softwareModules":[
			{
				"softwareModule":{
					"name":"install-hello",
					"version":"1.0.0"
				},
				"artifacts":[
					{
						"checksums":{
							"SHA256":"db954c633393c1402f145a60fd58d312f5af96ce49422fcfd6ce42a3c4cceeca",
							"MD5":"8c5a0fa2c01e218262d672bf643652fd",
							"SHA1":"7539b451d818d94bcd97d401a5467b3e1c0b8981"
						},
						"download":{
							"HTTPS":{
								"url":"https://github.com/eclipse-kanto/kanto/raw/main/quickstart/install_hello.sh"
							}
						},
						"filename":"install.sh",
						"size":544
					}
				]
			}
		],
	}
}
Response

Hono Command : command//<name>:<namespace>/res//download

Ditto Message:

NameValueDescription
topic<name>/<namespace>/things/live/messages/downloadInformation about the affected Thing and the type of operation
path/features/SoftwareUpdatable/outbox/messages/downloadA path to the SoftwareUpdatable Feature, it’s message channel, and download command
HeadersAdditional headers
correlation-idcontainer UUIDThe same correlation id as the request message
StatusStatus of the download operation

Example : Successful download response.

Topic: `command//edge:device/res//download``

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