Skip to content

Devices in zone​

GET
/users/{id}/getDevicesInZone

Authorizations​

ApiKeyAuth

API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.

Type
API Key (header: Authorization)
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parameters​

Path Parameters

id*

user id

Type
string
Required
Format
"JSON"

Query Parameters

zoneId

ID of geofence to search. zoneId or zoneType required.

Type
string
Format
"JSON"
zoneType

Type of zones to search. Ignored if zoneId is specified. zoneId or zoneType required.

Type
string
Format
"JSON"
includeApprox

Include GSM / poor accuracy locations. Default to false.

Type
string
Format
"JSON"

Request example

Responses​

Request was successful

application/json
JSON
[
  
{
  
}
]
Try this endpoint

Playground​

Authorization
Variables
Key
Value

OpenAPI definition ​

References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).

View endpoint OpenAPI definition
yaml
openapi: 3.1.0
info:
  version: 1.1.0
  title: TrackingAPI
  description: V1 API for retrieving tracking data and changing settings on Lightbug devices
servers:
  - url: https://api.lightbug.cloud/api
externalDocs: {}
security:
  - ApiKeyAuth: []
tags:
  - name: device
paths:
  /users/{id}/getDevicesInZone:
    get:
      tags:
        - device
      summary: Devices in zone
      parameters:
        - name: id
          in: path
          description: user id
          required: true
          schema:
            type: string
            format: JSON
        - name: zoneId
          in: query
          description: ID of geofence to search. zoneId or zoneType required.
          required: false
          schema:
            type: string
            format: JSON
        - name: zoneType
          in: query
          description: Type of zones to search. Ignored if zoneId is specified. zoneId or zoneType required.
          required: false
          schema:
            type: string
            format: JSON
        - name: includeApprox
          in: query
          description: Include GSM / poor accuracy locations. Default to false.
          required: false
          schema:
            type: string
            format: JSON
      responses:
'200':
yaml
          description: Request was successful
          content:
            application/json:
              schema:
                description: Returns Array of device objects, with extra field `latestPoints`, containing an array of simplified datapoint objects. Datapoint fields included are 'id', 'timestamp', 'location', 'speed', 'course', 'accuracy', 'sendReason', 'address', 'deviceId', 'alertType'
                type: array
                items:
                  properties: {}
                  type: object
yaml
      deprecated: false
      security:
        - ApiKeyAuth: []
      operationId: get-users-id-getDevicesInZone
components:
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey
      description: API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See <a href='/apis/authentication'>Authentication</a> for more details.
      example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...