Skip to content

Vehicle Summary​

POST
/reports/vehicle-summary

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..."

Request Body​

application/x-www-form-urlencoded
object

The device id to get the data for

Format""

The date range to get the data for, in epoch milliseconds, [start, end]

Format"JSON"

Optional parameters, as JSON object, use the APP and developer console to see the options

Format"JSON"

Request example

Responses​

Request was successful

application/json
JSON
{
  
"numTrips": 0,
  
"totalDist": 0,
  
"totalTime": 0,
  
"avgDist": 0,
  
"avgTime": 0,
  
"idleTime": {
  
  
"total": 0,
  
  
"inWork": 0,
  
  
"inMaintenance": 0
  
},
  
"distances": {
  
  
"total": 0,
  
  
"inWork": 0,
  
  
"inMaintenance": 0
  
},
  
"ignitionTime": 0,
  
"movingTime": {
  
  
"total": 0,
  
  
"inWork": 0,
  
  
"inMaintenance": 0
  
},
  
"workTime": 0,
  
"maintenanceTime": 0,
  
"offTimes": {
  
  
"total": 0,
  
  
"inWork": 0,
  
  
"inMaintenance": 0
  
}
}
Try this endpoint

Playground​

Authorization
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
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:
  /reports/vehicle-summary:
    post:
      tags:
        - reports
requestBody:
yaml
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                deviceId:
                  description: The device id to get the data for
                  type: number
                  format: ''
                dateRange:
                  description: The date range to get the data for, in epoch milliseconds, [start, end]
                  type: string
                  format: JSON
                parameters:
                  description: Optional parameters, as JSON object, use the APP and developer console to see the options
                  type: string
                  format: JSON
              required:
                - deviceId
                - dateRange
        required: true
yaml
      responses:
'200':
yaml
          description: Request was successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  numTrips:
                    type: number
                  totalDist:
                    type: number
                  totalTime:
                    type: number
                  avgDist:
                    type:
                      - number
                      - 'null'
                  avgTime:
                    type:
                      - number
                      - 'null'
                  idleTime:
                    type: object
                    properties:
                      total:
                        type: number
                      inWork:
                        type: number
                      inMaintenance:
                        type: number
                  distances:
                    type: object
                    properties:
                      total:
                        type: number
                      inWork:
                        type: number
                      inMaintenance:
                        type: number
                  ignitionTime:
                    type:
                      - number
                      - 'null'
                  movingTime:
                    type: object
                    properties:
                      total:
                        type: number
                      inWork:
                        type: number
                      inMaintenance:
                        type: number
                  workTime:
                    type: number
                  maintenanceTime:
                    type: number
                  offTimes:
                    type: object
                    properties:
                      total:
                        type: number
                      inWork:
                        type: number
                      inMaintenance:
                        type: number
yaml
      deprecated: false
      security:
        - ApiKeyAuth: []
      operationId: post-reports-vehicle-summary
      summary: Vehicle Summary
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...