Sending commands
Once a user rolls out the artifacts via the Device Portal web interface or a system via the device
With the Portal Solution API, a command is created that can be received by the device.
Command properties
A command for the roll-out of artifacts contains the following properties:
| Name | Required | Format | Description | Example |
|---|---|---|---|---|
id |
Yes |
TEXT |
ID of the command. Must be used to update the command status in the Device Portal. |
|
artifactId |
Yes |
TEXT |
URN, identifies the artifact to load/install. |
|
source |
Yes |
TEXT |
URL of the API endpoint from which you want to download. |
|
authentication |
Yes |
TEXT |
Type of authentication:
|
"CERTIFICATE" |
contentLength |
NUMBER |
Size of the artifact in bytes |
|
|
sha256 |
TEXT |
Checksum used to check whether the download was successful |
|
| Name | Required | Format | Description | Example |
|---|---|---|---|---|
property 1 |
TEXT |
Contains the value that was defined via the Artifact Property at the property level.
|
"FIRMWARE" |
|
property 2 |
TEXT |
Contains the value that was defined via the Artifact Property at the property level.
|
|
Examples
Example 1
{
"cmd": "INSTALL_SOFTWARE",
"id": "6d48eba0-142e-11ed-9c40-eeee0aff254b",
"target": "urn:bosch:eg:ctrX.id.2022022201",
"artifactId": "urn:SOFTWARE:MySoftware?=channel=latest/ stable&revision=15&version=10",
"source": "https://dashboard.snapcraft.io/",
"authentication": "BRAND_STORE"
}
Example 2
{
"cmd": "APPLY_CONFIGURATION",
"id": "aQ-4UA9YEe2osO7uCv9cyA",
"target": "urn:bosch:eg:ctrX.id.2022022201",
"property2": "Parameter fits as additional command property 2",
"property1": "Parameter fits as additional command property 1",
"artifactId": "urn:CONFIGURATION:My first configuration?=channel=1.3/edge&revision=1140&version=1.5.0",
"source": "https://myrepository.azurewebsites.net/v1/artifact",
"authentication": "CERTIFICATE"
}
Example 3
{
"cmd": "APPLY_SETUP",
"id": "6d459040-142e-11ed-9c40-eeee0aff254b",
"target": "urn:bosch:eg:ctrX.id.2022022201",
"property2": "Parameter fits as additional command property 2",
"property1": "Parameter fits as additional command property 1",
"sha256": "7e5bdd023b6cf21efe42a8ec90bc1993fc853980d4b564688e5ac2d28c64223c",
"artifactId": "urn:SETUP:My second setup?=channel=1.2/edge&revision=1138&version=0.2.0",
"contentLength": "1024",
"source": "https://myrepository.azurewebsites.net/v1/setup-file",
"authentication": "CERTIFICATE_THEN_NONE"
}