Skip to content

Timeline of specific type for device​

GET
/devices/{id}/timeline/{type}

Gets timeline data of a specific type for a device

You may also be interested in the "Chasm" endpoints for live modern messaging observability.

Various types will take differing times to respond, some will fail depending on the device data and patterns of data available.
Some types require elevated permissions to access, in which case you would receive an error.

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*

Identifier of the device. Can be ID, IMEI, or Serial number. Use format 'id:1234', 'imei:139872149701', or 'serial:43000001'

Type
string
Required
type*

Timeline type (bootloader, activation, plans, devicemessage, datapoint, backendnote, pairing, sim)

Type
string
Required

Query Parameters

since

Only return events after this time (RFC3339). Defaults to 14 days ago.

Type
string
until

Only return events before this time (RFC3339). Defaults to now.

Type
string

Request Body​

application/json
JSON
{
}

Request example

Responses​

OK

application/json
JSON
{
  
"data": [
  
  
{
  
  
  
"description": "string",
  
  
  
"meta": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"timestamp": "string",
  
  
  
"type": "string"
  
  
}
  
],
  
"since": "string",
  
"until": "string"
}
Try this endpoint

Playground​

Authorization
Variables
Key
Value
Body

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
info:
  title: Lightbug API
  version: '2'
externalDocs:
  description: ''
  url: ''
openapi: 3.1.0
servers:
  - url: https://api.lightbug.cloud/v2
security:
  - ApiKeyAuth: []
tags: []
paths:
  /devices/{id}/timeline/{type}:
    get:
      description: |-
        Gets timeline data of a specific type for a device

        You may also be interested in the "Chasm" endpoints for live modern messaging observability.

        Various types will take differing times to respond, some will fail depending on the device data and patterns of data available.
        Some types require elevated permissions to access, in which case you would receive an error.
      parameters:
        - description: Only return events after this time (RFC3339). Defaults to 14 days ago.
          in: query
          name: since
          schema:
            type: string
        - description: Only return events before this time (RFC3339). Defaults to now.
          in: query
          name: until
          schema:
            type: string
        - description: Identifier of the device. Can be ID, IMEI, or Serial number. Use format 'id:1234', 'imei:139872149701', or 'serial:43000001'
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Timeline type (bootloader, activation, plans, devicemessage, datapoint, backendnote, pairing, sim)
          in: path
          name: type
          required: true
          schema:
            type: string
requestBody:
yaml
        content:
          application/json:
            schema:
              type: object
yaml
      responses:
'200':
yaml
          content:
            application/json:
              schema:
                properties:
                  data:
                    description: The timeline data
                    items:
                      properties:
                        description:
                          description: A text description of the event
                          type: string
                        meta:
                          additionalProperties:
                            type: string
                          description: Optional, A series of additional meta data for the event
                          type: object
                        timestamp:
                          description: The time of the event
                          type: string
                        type:
                          description: The type of event. Can be split with /
                          type: string
                      type: object
                    type: array
                    uniqueItems: false
                  since:
                    description: The time after which events are included
                    type: string
                  until:
                    description: |-
                      The time up until which the timeline was created for (can be used for polling as the next since)
                      In case systems have lag, it might be wise to use a time before this time to poll for more data, deduplicating what you don't want
                    type: string
                type: object
          description: OK
'400':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Bad Request
'401':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Unauthorized
'403':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Forbidden
'404':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Not Found
'429':
yaml
          content:
            application/json:
              schema:
                type: string
          description: Limit exceeded
          headers:
            X-Ratelimit-Limit:
              schema:
                type: integer
            X-Ratelimit-Remaining:
              schema:
                type: integer
            X-Ratelimit-Reset:
              schema:
                type: integer
yaml
      security:
        - ApiKeyAuth: []
      summary: Timeline of specific type for device
      tags:
        - devices
      operationId: get-devices-id-timeline-type
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...