Skip to content

Roll back a device to its previous application version

POST
/api/v1/devices/{id}/rollback-version
curl --request POST \
--url http://localhost:3000/api/v1/devices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rollback-version \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "reason": "v2.4.1 crash-looping on the line-3 gateways", "applicationPackageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Redeploys the application version this device ran before its current one, producing a new manifest version (never reusing or decrementing). Returns 409 when the device has no distinct previous version. This does not abort an in-flight rollout.

id
required
string format: uuid

Device UUID

Media type application/json
object
reason

Operator-supplied reason, recorded on the audit entry

string
<= 500 characters
Example
v2.4.1 crash-looping on the line-3 gateways
applicationPackageId

Which application to roll back. Rollback is scoped to one application package; on a device running several, omitting this picks the most recently sealed rollbackable one.

string format: uuid

Device rolled back to its previous version

Forbidden — caller lacks required permission

Device not found

No previous version to roll back to