Get device
- Sandbox: available
- Staging: available
- Production: unknown
Returns one device with its zone, location and resident assignments and its current connection status. Use it to show or edit a single device.
Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs Device:read.
Scope: the device is read with your token, so Medplum's access policy limits which devices you can read.
Behaviour
organizationIdis the zone of the device's location. When the device has no location, it falls back to the device's own owner organization.organizationName,locationNameandpatientNameare display names. Each isnullwhen the resource has no name that can be shown.statusisactiveonly when the device was last seen recently enough. A device whose last-seen time is stale readsinactive, even if it was never marked offline. A device without an identifier reports its stored FHIR status.statusReasonexplains aninactivestatus when the platform recorded why.floor,roomandbedcome from the address of the device's location.- Read-only. Nothing is written.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/device/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>id*stringuuidThe device.
application/json- response
id*stringDevice resource id.
name*stringstatus?string"active""inactive""entered-in-error""unknown"statusReason*array<>thingsboardId?stringorganizationId?stringorganizationName*stringlocationId?stringlocationName*stringpatientId?stringpatientName*stringfloor?stringroom?stringbed?stringcurl -X GET 'https://api.sandbox.ovok.com/v1/slim/device/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "string", "name": "string", "status": "active", "statusReason": [ { "code": "string", "display": "string" } ], "thingsboardId": "string", "organizationId": "string", "organizationName": "string", "locationId": "string", "locationName": "string", "patientId": "string", "patientName": "string", "floor": "string", "room": "string", "bed": "string"}Resolve how ingest routes device serials POST
For each serial you send, returns the manufacturer and model that ingest files it under, and whether ingest accepts the serial at all. Use it to check serials before you create devices or send data. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `Device:read`. ## Behaviour - Send 1 to 500 serials, each at most 64 characters. - Rows come back in the order you sent them. - `routable: false` means ingest rejects the serial with `400`. `manufacturer` and `model` are then `null`. - The serial alone decides the result. A manufacturer that ingest only accepts when named explicitly, such as Masimo, is never inferred from a serial. - Nothing is read or written. The result is computed from the serial only. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/slim/device/routing' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{"serials": ["3001000", "12,34"]}' ``` ```json { "resources": [ { "serial": "3001000", "manufacturer": "Sleepiz", "model": "OnePlus", "routable": true }, { "serial": "12,34", "manufacturer": null, "model": null, "routable": false } ] } ```
Delete device DELETE
Deletes a device from your project. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `Device:delete`. System Owners cannot delete devices. **Scope:** the device must belong to the caller's project (from the token). ## Behaviour - The Device resource is deleted. This cannot be undone. - If a resident is assigned, they are unassigned and their active out-of-bed episode is closed in the same transaction. - The device's use history is updated in the same transaction. - The delete is recorded in the change history. - The response has no body. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/device/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```