Skip to content

Get device gateway reading by id​

GET
/devices/{id}/gatewayReadings/{fk}

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
number
Required
Format
"integer"
fk*

Foreign key for gatewayReadings

Type
number
Required
Format
"integer"

Request example

Responses​

Body (JSON)

application/json
JSON
{
  
"timestamp": "string",
  
"created": "string",
  
"type": "string",
  
"value": {
  
},
  
"rssi": 0,
  
"meta": {
  
},
  
"relatedId": 0,
  
"correlationId": "string",
  
"id": 0,
  
"gatewayId": 0,
  
"deviceId": 0,
  
"datapointId": 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}/gatewayReadings/{fk}:
    get:
      tags:
        - readings-gateway
      summary: Get device gateway reading by id
      parameters:
        - name: id
          in: path
          description: device id
          required: true
          schema:
            type: number
            format: integer
        - name: fk
          in: path
          description: Foreign key for gatewayReadings
          required: true
          schema:
            type: number
            format: integer
      responses:
'200':
yaml
          description: Body (JSON)
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    description: Timestamp for the reading
                    type: string
                    format: date-time
                  created:
                    description: Timestamp for the writing to db
                    type: string
                    format: date-time
                  type:
                    description: 'Sensor type: ''ultra'' (fill level), ''temp'' (temperature), ...'
                    type: string
                  value:
                    description: JSON value
                    type: object
                  rssi:
                    description: RSSI if from secondary wireless device
                    type: number
                    format: ''
                  meta:
                    description: JSON metadata
                    type: object
                  relatedId:
                    description: LoraId of another (ie for signal strength)
                    type: number
                    format: ''
                  correlationId:
                    description: Internal use - correlation identifier
                    type: string
                  id:
                    type: number
                    format: ''
                  gatewayId:
                    type: number
                    format: ''
                  deviceId:
                    type: number
                    format: ''
                  datapointId:
                    type: number
                    format: ''
                required:
                  - timestamp
                  - created
                  - type
                  - value
                type: object
yaml
      deprecated: false
      security:
        - ApiKeyAuth: []
      operationId: get-devices-id-gatewayReadings-fk
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...