Update location in zone
- Sandbox: available
- Staging: available
- Production: unknown
Updates a location in a zone: its name, floor, room and bed, the devices assigned to it, and the resident on those devices.
Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Location:update and Device:update (an admin or super admin who holds no access policy skips this check).
Scope: The zone must belong to the caller's project (from the token), its parent project, or one of its sub-projects. The location must be in the caller's project, and its managing organization must be the zone. Devices and residents named in the body must be in your project or a sub-project.
Behaviour
nameis required and must be unique among the locations your token can search, not counting this one.floor,roomandbedreplace only the values you send; omitted ones keep their stored value. The resulting floor, room and bed must not match another location in the zone.deviceId(one UUID or a list) sets the devices at the location to exactly that set: devices not listed are removed from it, new ones are added.nullremoves every device. OmitdeviceIdto leave the devices unchanged.patientIdassigns that resident to the devices named indeviceId, or, withoutdeviceId, to the location's single device. A resident assigned there before is unassigned from those devices.- Omitting
patientIdunassigns the current resident from every device at the location (and from the devices indeviceId). Send the currentpatientIdto keep the resident. - A discharged resident cannot be assigned.
- The write is atomic and takes a short write lock on the devices and locations it touches.
- The response is the updated location, in the same shape as
GET /v1/slim/location/{id}.
Example
curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/zones/c3499c27-2973-0a7f-807e-fb8676a92dcb/locations/87ea5dfc-8b8e-384d-8489-79496e706390' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "name": "Room 101 Bed 1", "room": "101", "bed": "1", "deviceId": "c3499c27-2973-0a7f-807e-fb8676a92dcb", "patientId": "87ea5dfc-8b8e-384d-8489-79496e706390" }'bearerAuthorizationBearer <JWT>zoneId*stringuuidlocationId*stringuuidapplication/json- body
name*string1 <= lengthfloor?stringroom?stringbed?stringdeviceId?|array<>patientId?stringuuidUpdated location.
application/json- response
id*stringLocation id.
name*stringfloor?stringroom?stringbed?stringorganizationId?stringorganizationName?stringdeviceId?array<string>Every device at the location. Omitted when the location has none.
deviceName?stringAlphabetically first name among the devices at the location.
patientId?stringResident on the first device at the location that has one.
patientName?stringcurl -X PUT 'https://api.sandbox.ovok.com/v1/slim/zones/497f6eca-6276-4993-bfeb-53cbbbba6f08/locations/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "name": "string", "floor": "string", "room": "string", "bed": "string", "organizationId": "string", "organizationName": "string", "deviceId": [ "string" ], "deviceName": "string", "patientId": "string", "patientName": "string"}Delete location in zone DELETE
Deletes an empty location from a zone, or, with `dryRun=true`, previews which devices and residents are at it without changing anything. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Location:update` and `Device:update` (an admin or super admin who holds no access policy skips this check). **Scope:** The zone must belong to the caller's project (from the token), its parent project, or one of its sub-projects. The location must belong to the zone and to your project or a sub-project; a parent project's location is refused. ## Behaviour - `dryRun=true` returns `200` with `affected_devices` and `affected_residents` at the location, and a `warning` when either list is not empty. Nothing is written. - Without `dryRun` (any other value counts as false), the location is deleted only when no device is assigned to it. The call answers `204` with no body. - Reassign the location's devices before deleting it; the delete never unassigns devices for you. - A location-deleted entry is added to the change history. A failure to write that entry does not fail the request. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/zones/c3499c27-2973-0a7f-807e-fb8676a92dcb/locations/87ea5dfc-8b8e-384d-8489-79496e706390?dryRun=true' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
Check child project access policy drift GET
Compares the AccessPolicies of each direct child of your current project with your project's own, and reports the differences. Nothing is written. **Auth:** bearer token of a project admin (`ProjectMembership.admin`). **Scope:** the caller's project (from the token) and its direct children. Grandchildren are not compared. ## Behaviour - Policies are matched by `name`, and compared on `compartment`, `resource` and `ipAccessRule`. - Each difference is one `drift` entry with a `kind`: - `missing`: the child has no policy with that name. - `changed`: the child's policy differs from yours. - `orphan`: the child holds a policy whose name your project does not have. A child's own policies, such as its patient-sharing template, show up as orphans. - `copyOfDeletedPolicy` is true for an `orphan` that is a copy of one of your policies you have since deleted: every copy is tagged with the id of the policy it copies, and that policy is no longer in your project. It is false for every other entry, a child's own policies included, and always false for the two patient-sharing templates every project makes for itself, whatever their tag. - `count` is the number of entries. - `POST access-policy/reconcile` repairs the `missing` and `changed` entries and deletes the `copyOfDeletedPolicy` ones. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/internal/sub-project/access-policy/drift' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```