Hi,
I’m trying to improve our update system, and for that would need to send the information to force an update or not to the fleet/device. The docs says : “It is also possible to add custom metadata or a custom download URI when creating the update.”
So I’m trying to use that custom metadata to force or not the update. However, the API isn’t responding how i thought it would, and it looks like the “metadata” attribute makes the request go 400 :
curl --location 'https://app.torizon.io/api/v2beta/updates' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"packageIds": [
"my-package-id"
],
"devices": [
"my-device-id"
],
"custom": {
"my-package-id": {
"uri": "https://example.com/files/foo-1.0.yaml",
"metadata": "force"
}
}
}'
This results in a bad request returning :
{
"msg": "Error In Upstream Endpoint",
"description": null,
"code": "bad_update_request",
"cause": [
{
"reasons": [
"MissingField"
],
"errorCode": "bad_update_request"
}
],
"errorId": "xxx"
}
However, it works if we don’t put the metadata field.
Note that I tried using either device or fleet or even the /updates/fleet endpoint which return the same.
I don’t need a custom uri as well, so I’m wondering how to use this custom field correctly for my use ? Is it possible to just send the custom metadata string I need on updates ?
Best regards,