Zum Hauptinhalt springen

Delete and register hardware trackers again

A hardware tracker (TRACKING_DEVICE) can belong to only one workspace at a time. Deactivation keeps its identifier reserved. To make it available for registration again, its current workspace deletes it using DELETE /api/v2/devices/{device_id} with the devices:delete grant.

End every current Vehicle–Device association first, including associations that are not the operational Device or location source. A current association or another required dependency returns 409. Ended assignments do not prevent tracker deletion.

Successful deletion returns 204. The tracker disappears from ordinary lists, search, maps and selection controls. Its original UUID, descriptive fields, telemetry history and ended assignments remain in the original workspace, subject to existing retention policies. The hardware identifier becomes available to register through the normal create flow. This creates a new Device UUID and natural ID, even in the same workspace; history never transfers to that new registration.

Pending cleanup and retries​

Provider cleanup must finish before ownership is released. If cleanup fails, the API returns an error (503 for provider unavailability) and keeps ownership reserved. Reads expose deletion_requested_at; the pending tracker cannot be updated, assigned, activated or used for telemetry. Retry the same DELETE to complete cleanup. A repeated DELETE after completion returns 204 without repeating the deletion event. An unknown UUID returns 404.

Read historical details​

An ordinary GET /api/v2/devices/{device_id} returns 404 after deletion. With devices:read in the original workspace, use GET /api/v2/devices/{device_id}?include_deleted=true to read the retained record. It includes deleted_at and deletion_requested_at, and never exposes a live current_state. Mutations return 404; there is no restore operation.

The Vehicle Devices tab's Past device assignments opens these read-only details. The association API's lifecycle=all also keeps the original Device identity available after deletion. Another workspace cannot retrieve that history, even after registering the same hardware identifier.

These retention semantics apply to hardware trackers. Tourfold App and direct OsmAnd devices keep their existing hard-deletion behavior; their assignment history continues to prevent deletion.