Skip to content

Roll back a group of devices to their previous application version

POST
/api/v1/devices/rollback-version
curl --request POST \
--url http://localhost:3000/api/v1/devices/rollback-version \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "deviceSelector": { "matchLabels": { "site": "plant-a" }, "matchExpressions": [ { "key": "line", "operator": "In", "values": [ "line-3" ] } ] }, "reason": "example", "applicationPackageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Redeploys the application version each matching device ran before its current one. Devices with no distinct previous version are reported as skipped rather than failing the batch. This does not abort an in-flight rollout — see the deployment rollback route.

Media type application/json
object
deviceSelector
required

Label selector choosing which devices to roll back

object
matchLabels

Exact label equality match; all entries must match (AND).

object
Example
{
"site": "plant-a"
}
matchExpressions
Array<object>
object
key
required

Label key to match on

string
Example
line
operator
required
string
Allowed values: In NotIn Exists DoesNotExist
Example
In
values
Array<string>
Example
[
"line-3"
]
reason

Operator-supplied reason, recorded on the audit entry

string
<= 500 characters
applicationPackageId

Which application package to roll back on every matching device.

string format: uuid

Rollback evaluated for every matching device

DeviceSelector missing or malformed

Forbidden — caller lacks required permission

No devices matched the selector