Locations
List locations in a project (admin)
List locations in a project (admin) using Ovok’s Slim API.
| Method | Path |
|---|---|
GET | /v1/slim/location/admin/list |
Authentication · Access policies
Lists the locations of a given project. The admin dashboard uses it to fill the location picker after you choose a project.
Auth: Bearer token. The caller must be a project admin. Super admins without the admin role, practitioners and System Owner callers are refused. The access-policy check (Location:search, Location:read) is skipped for admins.
Scope: The project named by the required projectId query parameter. The search runs with Ovok's admin client, not the caller's token.
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string (uuid) | Yes | Project to list locations of. |
page | integer | No | Zero-based page number. Default 0, minimum 0. |
count | integer | No | Rows per page. Default 50, minimum 1, maximum 100. |
Behaviour
- Read-only.
- Locations are sorted by name.
- Pagination is zero-based:
page(default0) andcount(default50, max100). totalis an estimate: when a page is full it is one more than the rows seen so far, so a full page means more may follow.- Unlike
GET /v1/slim/location, rows carry no device or resident fields: one row per location.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/admin/list?projectId=b7a3d915-6e20-4c8f-9a14-3d5f7b9c1e68&page=0&count=50' \
-H "Authorization: Bearer ${OVOK_TOKEN}"Successful response
200 — Locations retrieved successfully.
{
"total": 1,
"page": 0,
"count": 50,
"resources": [
{
"id": "5d2a9c64-7e1b-4830-b6f5-9a3c1e8d7b02",
"name": "Room 18",
"floor": "2",
"room": "18",
"organizationId": "1e6b8d30-2c4f-4a95-8d7e-b0a2c4e6f918",
"organizationName": "Zone A"
}
]
}| Field | Type | Description |
|---|---|---|
total | integer | Estimated total. When the page is full, one more than the rows seen so far. |
page | integer | Page number of this response. |
count | integer | Page size of this response. |
resources | object[] | The rows of this page, sorted by name. |
resources[].id | string (uuid) | Location id. |
resources[].name | string | Location name. Empty string when it has none. |
resources[].floor | string | Floor code. Left out when not set. |
resources[].room | string | Room code. Left out when not set. |
resources[].bed | string | Bed code. Left out when not set. |
resources[].organizationId | string (uuid) | Zone id. Left out when the location has no zone. |
resources[].organizationName | string | Zone name. Left out when the location has no zone. |
Errors
Last updated on