Update Manager API

The kanto update manager service provides orchestration of OTA Updates towards a target device in a smart way.

Apply

Applies a desired state to the device.

Request

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

Ditto Message:

NameValueDescription
topic<name>/<namespace>/things/live/messages/applyInformation about the affected Thing and the type of operation
path/features/UpdateManager/inbox/messages/applyA path to the UpdateManager Feature, it’s message channel, and apply command
HeadersAdditional headers
response-requiredtrue/falseIf response is required
content-typeapplication/jsonThe content type
correlation-idcontainer UUIDUsed for correlating protocol messages, the same correlation-id as the sent back response message
Value
activityIdThe activity id of the new desired state
desiredStateThe desired state to be applied on a device
baselinesAn array of domain or cross-domain dependencies between components
titleThe title of the dependency
descriptionThe description of the dependency
preconditionsThe preconditions of the dependency
componentsAn array of the components of the dependency
domainsAn array of desired state for a single domain
idThe id of this domain
configAn array of key/value string pair
keyThe key string
valueThe value of the key string
componentsAn array of desired state component with additional key-value configuration pairs
idThe id of the component
versionThe version of the component
keyThe key string
valueThe value of the key string

Example : Apply a desired state to the device.

Topic: command//edge:device/req//apply

{
	"topic":"edge/device/things/live/messages/apply",
	"headers":{
		"response-required":true,
		"content-type":"application/json",
		"correlation-id":"<UUID>"
	},
	"path":"/features/UpdateManager/inbox/messages/apply",
	"value":{
		"activityId": "d91ad6fe-9b0c-4549-bf31-17d0a71b61de",
		"desiredState": {
			"baselines": [
				{
					"title": "simple-baseline",
					"description": "",
					"precondition": "",
					"components": [
						"domain:component1",
						"domain:component2"
					]
				}
			],
			"domains": [
				{
					"id": "containers",
					"config": [
						{
							"key": "source",
							"value": "value"
						}
					],
					"components": [
						{
							"id": "containers:influxdb",
							"version": "2.7.1",
							"config": [
								{
									"key": "image",
									"value": "docker.io/library/influxdb:$influxdb_version"
								}
							]
						}
					]
				}
			]
		}
	}
}
Response

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

Ditto Message:

NameValueDescription
topic<name>/<namespace>/things/live/messages/applyInformation about the affected Thing and the type of operation
path/features/UpdateManager/outbox/messages/applyA path to the UpdateManager Feature, it’s message channel, and apply command
HeadersAdditional headers
content-typeapplication/jsonThe content type
correlation-id<UUID>The same correlation id as the request message
StatusStatus of the operation apply

Example : Successful response of an apply desired state operation.

Topic: command//edge:device/res//apply

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

Refresh

Reads the current state from the device and updates the status of the UpdateManager feature.

Request

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

Ditto Message:

NameValueDescription
topic<name>/<namespace>/things/live/messages/refreshInformation about the affected Thing and the type of operation
path/features/UpdateManager/inbox/messages/refreshA path to the UpdateManager Feature, it’s message channel, and refresh command
HeadersAdditional headers
response-requiredtrue/falseIf response is required
content-typeapplication/jsonThe content type
correlation-idcontainer UUIDThe container UUID
Value
activityIdThe activity id of the refresh operation

Example : Update the status of the UpdateManager feature.

Topic: command//edge:device/req//refresh

{
	"topic": "edge/device/things/live/messages/refresh",
	"headers": {
		"response-required": true,
		"content-type":" application/json",
		"correlation-id": "<UUID>"
	},
	"path": "/features/UpdateManager/inbox/messages/refresh",
	"value": {
		"activityId": "e08b071c-c19e-41de-8da0-e2843113161f"
	}
}
Response

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

Ditto Message:

NameValueDescription
topic<name>/<namespace>/things/live/messages/refreshInformation about the affected Thing and the type of operation
path/features/UpdateManager/outbox/messages/refreshA path to the UpdateManager Feature, it’s message channel, and refresh command
HeadersAdditional headers
content-typeapplication/jsonThe content type
correlation-id<UUID>The same correlation id as the request message
StatusStatus of the refresh operation

Example : Successful response of a refresh operation.

Topic: command//edge:device/res//refresh

{
	"topic": "edge/device/things/live/messages/refresh",
	"headers": {
		"content-type": "application/json",
		"correlation-id": "<UUID>"
	},
	"path": "/features/UpdateManager/outbox/messages/refresh",
	"status": 204
}
Last modified June 28, 2024