List locations in a project (admin)
| 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 Medplum 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.
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=3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21&page=0&count=50' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
Successful response
200 — Locations retrieved successfully.
Errors
| Status | Meaning |
|---|---|
401 | Bearer token is missing, invalid or expired. |
403 | You are not a Medplum admin. |
422 | A query parameter fails validation. |