---
title: "GET /locations"
method: GET
path: "/locations"
tags: ["Locations"]
---

# GET /locations

`GET /locations`

This endpoint is used to retrieve a list of locations. Support for Location-based camera grouping is only available in the professional and enterprise editions.
It is important to note that after using the pageSize parameter, the "totalSize" in the response represents the total number of available locations, not the number of locations resulting from the query string.

## Query parameters

- `include` string[]
- `sort` string[]
- `pageToken` string
- `pageSize` integer
- `id__in` string[]
- `parentId` string
- `parentId__ne` string
- `parentId__in` Id[]
- `name` string — Name of the item.
- `name__ne` string
- `name__in` string[]
- `name__contains` string
- `address.streetAddress` string
- `address.streetAddress__ne` string
- `address.streetAddress__in` string[]
- `address.streetAddress__contains` string
- `address.streetAddress2` string
- `address.streetAddress2__ne` string
- `address.streetAddress2__in` string[]
- `address.streetAddress2__contains` string
- `address.city` string
- `address.city__ne` string
- `address.city__in` string[]
- `address.city__contains` string
- `address.region` string
- `address.region__ne` string
- `address.region__in` string[]
- `address.region__contains` string
- `address.country` string
- `address.country__ne` string
- `address.country__in` string[]
- `address.country__contains` string
- `address.postalCode` string
- `address.postalCode__ne` string
- `address.postalCode__in` string[]
- `address.postalCode__contains` string
- `childLocationCount` integer
- `childLocationCount__ne` integer
- `q` string
- `qRelevance__gte` number, float

## Response `200`

Successfully fetched

- PaginatedLocationResponse — Used to wrap results for a paginated response, containing information on how to retrieve further pages.
  - `nextPageToken` string, nullable, required — Token to retrieve the next page. The value of this token is passed into the field pageToken. This value can be null if there is no next page.
  - `prevPageToken` string, nullable, required — Token to retrieve the previous page. The value of this token is passed into the field pageToken. This value can be null of there is no previous page.
  - `results` object[], required — The result set from a collection API call.
    - `id` string, required
    - `name` string, required
    - `parentId` string, required — Unique identifier of this location's parent location in the hierarchy
    - `isDefault` boolean, required — Specifies if a new device should be automatically assigned to this location if not supplied
    - `address` LocationAddress
      - `country` string
      - `region` string
      - `city` string
      - `streetAddress` string
      - `streetAddress2` string
      - `postalCode` string
    - `notes` string — Description for the location
    - `geometry` object, nullable — GeoJSON structure to store polygon for the specific location. Currently the only supported geometry type is MultiPolygon, but in the future more GeoJSON schemas might be supported, so clients should be able to handle unknown schemas. This field must be in the standard GeoJSON format, as described in https://datatracker.ietf.org/doc/html/rfc7946 Please read https://datatracker.ietf.org/doc/html/rfc7946 for more information about the GeoJSON standard.
      - `type` 'MultiPolygon', required
      - `coordinates` array[], required
        - array[]
          - array[]
            - number[]
      - `bbox` number[]
    - `childLocationCount` integer — The total count of direct children of the location
    - `effectivePermissions` EffectiveLocationPermissions
      - `read` boolean
      - `delete` boolean
      - `edit` boolean
    - `resourceCounts` ResourceCounts1 — Count of resources.
      - `cameras` integer
      - `bridges` integer
      - `speakers` integer
      - `users` integer
      - `multiCameras` integer
    - `resourceStatusCounts` ResourceStatusCounts1 — Count of resources by status.
      - `cameras` CameraStatusCounts
        - `online` integer
        - `deviceOffline` integer
        - `off` integer
        - `bridgeOffline` integer
        - `invalidCredentials` integer
        - `error` integer
        - `unknown` integer
      - `bridges` BridgeStatusCounts
        - `online` integer
        - `deviceOffline` integer
        - `unknown` integer
      - `users` UserStatusCounts
        - `active` integer
        - `blocked` integer
        - `pending` integer
      - `multiCameras` CameraStatusCounts
        - `online` integer
        - `deviceOffline` integer
        - `off` integer
        - `bridgeOffline` integer
        - `invalidCredentials` integer
        - `error` integer
        - `unknown` integer
    - `resourceStatusV2Counts` ResourceStatusV2Counts1 — Count of resources by cloud connection status and edge-reported device status.
      - `cameras` CameraStatusV2Counts
        - `cloudConnectionStatus` CloudConnectionStatusCounts
          - `connected` integer
          - `disconnected` integer
        - `edgeReportedDeviceStatus` EdgeReportedDeviceStatusCounts
          - `operational` integer
          - `disabled` integer
          - `unreachable` integer
          - `error` integer
          - `unknown` integer
          - `initializing` integer
      - `bridges` BridgeStatusV2Counts
        - `cloudConnectionStatus` CloudConnectionStatusCounts
          - `connected` integer
          - `disconnected` integer
        - `edgeReportedDeviceStatus` EdgeReportedDeviceStatusCounts
          - `operational` integer
          - `disabled` integer
          - `unreachable` integer
          - `error` integer
          - `unknown` integer
          - `initializing` integer
      - `users` UserStatusCounts
        - `active` integer
        - `blocked` integer
        - `pending` integer
      - `multiCameras` CameraStatusV2Counts
        - `cloudConnectionStatus` CloudConnectionStatusCounts
          - `connected` integer
          - `disconnected` integer
        - `edgeReportedDeviceStatus` EdgeReportedDeviceStatusCounts
          - `operational` integer
          - `disabled` integer
          - `unreachable` integer
          - `error` integer
          - `unknown` integer
          - `initializing` integer
    - `qRelevance` number, float — Field is only returned when `q` parameter is used and its value indicates the relevance of the location in relation to the terms in the `q` parameter. The range of this value is between 0 and 1, higher is better.
  - `totalSize` integer, required — Size of the total result set.

## Other responses

- `400` — The supplied object is invalid. Error detail will contain the validation error.
- `401` — You are not authenticated. Please authenticate and try again.
- `403` — You have no permission to access the specified resource.
- `500` — Something went wrong in the server. Please try again.

---

[API](https://skmtc.net/eagleeyenetworks/apis/devices.md) · [All operations](https://skmtc.net/eagleeyenetworks/apis/devices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeyenetworks/devices/revisions/df57313de545/schema)
