Skip to main content

List locations in a project (admin)

MethodPath
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 (default 0) and count (default 50, max 100).
  • total is 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​

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a Medplum admin.
422A query parameter fails validation.