Get safe-zone for device​
GET
/devices/{id}/getSafeZone
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*
device id
Type
Requirednumber
Format
"integer"GET
/devices/{id}/getSafeZone
Request example
Responses​
Body (JSON)
application/json
JSON"outline": [{}],"center": {"lat": 0,"lng": 0},"radius": 0,"type": "string","name": "string","wasInside": false,"lastChecked": "string","modified": false,"meta": {},"foreignId": "string","id": 0,"deviceId": 0,"configId": 0,"userId": 0
{
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
}
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: []
paths:
/devices/{id}/getSafeZone:
get:
tags:
- device-config
parameters:
- name: id
in: path
description: device id
required: true
schema:
type: number
format: integer
responses:'200':
yaml
description: Body (JSON)
content:
application/json:
schema:
properties:
outline:
description: Array of {lat:x,lng:y} objects representing the vertices of the polygon. Do not use with center and radius.
type: array
items:
type: object
center:
properties:
lat:
type: number
lng:
type: number
type: object
radius:
description: For circular geofences, the radius of the circle in meters. Property is ignored if outline != null.
type: number
format: ''
type:
description: Grouping value
type: string
name:
type: string
wasInside:
default: false
description: If the last point received was inside the geofence. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: boolean
lastChecked:
description: When the geofence was last evaluated. Only updated for notifications (not the safe-zone as that is evaluated on the device)
type: string
format: date-time
modified:
default: false
type: boolean
meta:
type: object
foreignId:
type: string
id:
type: number
format: ''
deviceId:
type: number
format: ''
configId:
type: number
format: ''
userId:
type: number
format: ''
type: objectyaml
deprecated: false
summary: Get safe-zone for device
security:
- ApiKeyAuth: []
operationId: get-devices-id-getSafeZone
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...