Dear Toradex Team,
we want to develop our own update front-end which allows us to trigger an update for a specific device with the Torizon OTA API.
For this we are calling the /device/packages/{deviceUuid}
to get the information which software is currently installed on the device.
When experimenting with this I discovered that the packageVersion
is always set to "unknown-version"
but the packageName
value contains a concatination of packageName
and packageVersion
. I think this is called the packageID
e.g. when calling:
curl -X 'GET' \
'https://app.torizon.io/api/v2beta/devices/packages/<uuid>' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'
I get as resonse:
{
"deviceUuid": "<uuid>",
"installedPackages": [
{
"component": "apalis-imx8",
"installed": {
"packageName": "n11-os-images-5.3.0-1",
"packageVersion": "unknown-version",
"checksum": "573bee1c603ae3bb5fb4b5abca36fa0fc5fedb70ef584a7fb11bc7dd2de015c8"
}
},
{
"component": "docker-compose",
"installed": {
"packageName": "docker-compose-stable.yml-RG-MD-29",
"packageVersion": "unknown-version",
"checksum": "f6790347ca01710007a3ef2cc9497c145d6867cdadf00b0a7509756764855b4f"
}
}
]
}
I think this is not the intended behavior, right?
This is not a big problem, as we simply can split the string into name and version ourself. But I would like to know if you are going to change the response in the future so I can prepare for this?
My suggestion is to correct the values of packageName
and packageVersion
and add a third value packageId
which contains the combination of both. Just like it is done when calling the packages
endpoint.
Thanks and best regards,
Thorbjörn