Lytx HOS (DriveCam) API

The HOS (DriveCam) API from Lytx — 4 operation(s) for hos (drivecam).

Operations 4

GET /v1/hos Get HOS Logs for all Users #
GET /v1/hos/ Get HOS Logs for Specified User #
GET / Get HOS Logs for All Users #
GET /{userName} Get HOS Logs for Specified User #

Documentation

📖
Documentation
https://developer.lytx.com/openapispec/consent.openapi
📖
APIReference
https://developer.lytx.com/openapispec/consent.openapi
📖
Documentation
https://developer.lytx.com/openapispec/device.openapi
📖
APIReference
https://developer.lytx.com/openapispec/device.openapi
📖
Documentation
https://developer.lytx.com/openapispec/deviceplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/deviceplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/devicestatusinfoplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/devicestatusinfoplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/diagnosticsplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/diagnosticsplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/distance.openapi
📖
APIReference
https://developer.lytx.com/openapispec/distance.openapi
📖
Documentation
https://developer.lytx.com/openapispec/driver.assignment.openapi
📖
APIReference
https://developer.lytx.com/openapispec/driver.assignment.openapi
📖
Documentation
https://developer.lytx.com/openapispec/driversplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/driversplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/dvir.openapi
📖
APIReference
https://developer.lytx.com/openapispec/dvir.openapi
📖
Documentation
https://developer.lytx.com/openapispec/dvirplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/dvirplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/ecm.openapi
📖
APIReference
https://developer.lytx.com/openapispec/ecm.openapi
📖
Documentation
https://developer.lytx.com/openapispec/ecm.v2.openapi
📖
APIReference
https://developer.lytx.com/openapispec/ecm.v2.openapi
📖
Documentation
https://developer.lytx.com/openapispec/exceptioneventplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/exceptioneventplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/faultdataplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/faultdataplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/fleetutilizationplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/fleetutilizationplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/geofences.openapi
📖
APIReference
https://developer.lytx.com/openapispec/geofences.openapi
📖
Documentation
https://developer.lytx.com/openapispec/gps.openapi
📖
APIReference
https://developer.lytx.com/openapispec/gps.openapi
📖
Documentation
https://developer.lytx.com/openapispec/gpsplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/gpsplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/group.openapi
📖
APIReference
https://developer.lytx.com/openapispec/group.openapi
📖
Documentation
https://developer.lytx.com/openapispec/group.v2.openapi
📖
APIReference
https://developer.lytx.com/openapispec/group.v2.openapi
📖
Documentation
https://developer.lytx.com/openapispec/groupplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/groupplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/hos.openapi
📖
APIReference
https://developer.lytx.com/openapispec/hos.openapi
📖
Documentation
https://developer.lytx.com/openapispec/hosplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/hosplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/iftareportplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/iftareportplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/legacy.driversession.services.openapi
📖
APIReference
https://developer.lytx.com/openapispec/legacy.driversession.services.openapi
📖
Documentation
https://developer.lytx.com/openapispec/legacy.groups.openapi
📖
APIReference
https://developer.lytx.com/openapispec/legacy.groups.openapi
📖
Documentation
https://developer.lytx.com/openapispec/legacy.hos.openapi
📖
APIReference
https://developer.lytx.com/openapispec/legacy.hos.openapi
📖
Documentation
https://developer.lytx.com/openapispec/legacy.vehicleinfo.aggregator.openapi
📖
APIReference
https://developer.lytx.com/openapispec/legacy.vehicleinfo.aggregator.openapi
📖
Documentation
https://developer.lytx.com/openapispec/legacy.vehicles.openapi
📖
APIReference
https://developer.lytx.com/openapispec/legacy.vehicles.openapi
📖
Documentation
https://developer.lytx.com/openapispec/legacy.videoplatform.openapi
📖
APIReference
https://developer.lytx.com/openapispec/legacy.videoplatform.openapi
📖
Documentation
https://developer.lytx.com/openapispec/maintenancerecordsplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/maintenancerecordsplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/ruleplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/ruleplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/safety.openapi
📖
APIReference
https://developer.lytx.com/openapispec/safety.openapi
📖
Documentation
https://developer.lytx.com/openapispec/statusdataplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/statusdataplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/trips.openapi
📖
APIReference
https://developer.lytx.com/openapispec/trips.openapi
📖
Documentation
https://developer.lytx.com/openapispec/tripsplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/tripsplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/user.openapi
📖
APIReference
https://developer.lytx.com/openapispec/user.openapi
📖
Documentation
https://developer.lytx.com/openapispec/userplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/userplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/vehicles.openapi
📖
APIReference
https://developer.lytx.com/openapispec/vehicles.openapi
📖
Documentation
https://developer.lytx.com/openapispec/video.openapi
📖
APIReference
https://developer.lytx.com/openapispec/video.openapi
📖
Documentation
https://developer.lytx.com/openapispec/zonesplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/zonesplus.openapi
📖
Documentation
https://developer.lytx.com/openapispec/zonesputandpostplus.openapi
📖
APIReference
https://developer.lytx.com/openapispec/zonesputandpostplus.openapi

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lytx-hos-drivecam-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lytx-hos-drivecam-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lytx HOS (DriveCam) API
  version: 1.0.0
  description: 'Operations tagged HOS (DriveCam) across 2 of this provider''s published API definitions: lytx-hos-openapi.yml, lytx-legacy.hos-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.lytx.com
- url: https://lytx-api.prod2.ph.lytx.com/hos
- url: https://lytx-api.prod5.ph.lytx.com/hos
- url: https://lytx-api.prod6.lv.lytx.com/hos
- url: https://lytx-api.prod7.lv.lytx.com/hos
- url: https://lytx-api.prod8.lv.lytx.com/hos
tags:
- name: HOS (DriveCam)
paths:
  /v1/hos:
    get:
      tags:
      - HOS (DriveCam)
      description: This endpoint is used to retrieve HOS Logs as a batch for all users for your company.
      summary: Get HOS Logs for all Users
      operationId: Hos_GetHosLogs
      parameters:
      - name: startDate
        in: query
        required: true
        schema:
          type: string
          format: date-time
          example: '2023-06-01'
        description: The start date.
      - name: endDate
        in: query
        required: true
        schema:
          type: string
          format: date-time
          example: '2023-06-02'
        description: End date must be within 1 day for company.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  userName:
                    type:
                    - string
                    - 'null'
                    example: UnknownDriver
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        userName:
                          type:
                          - string
                          - 'null'
                          example: UnknownDriver
                          description: The Account username.
                        dateTime:
                          type: string
                          format: date-time
                          example: '2023-09-21T20:30:40Z'
                          description: Date Time of the log event.
                        vehicleName:
                          type:
                          - string
                          - 'null'
                          example: 2015 FRD Fleet Express
                          description: Vehicle name or ID number.
                        companyId:
                          type: number
                          example: '888'
                          description: Company ID number.
                        editDateTime:
                          type: string
                          format: date-time
                          example: '2023-09-21T20:40:40Z'
                          description: The date and time the log was edited. If the log has not been edited, this will not be set.
                        latitude:
                          type: number
                          format: double
                          example: 32.887558
                          description: Latitude coordinates.
                        longitude:
                          type: number
                          format: double
                          example: -117.212288
                          description: Longitude coordinates.
                        status:
                          type:
                          - string
                          - 'null'
                          example: D
                          description: The driver�s duty status.
                        verifyDateTime:
                          type: string
                          format: date-time
                          example: '2023-01-01T00:00:00Z'
                          description: The date and time the log was verified. If the log is unverified, this will not be set.
                        origin:
                          type:
                          - string
                          - 'null'
                          example: Automatic
                          description: Indicates whether the event was generated automatically or created manually by the user.
                        serialNumber:
                          type:
                          - string
                          - 'null'
                          example: ''
                          description: The serial number of the Lytx device.
                        deviceId:
                          type:
                          - string
                          - 'null'
                          example: ''
                          description: Global unique identifier of the event recorder.
                        userId:
                          type:
                          - string
                          - 'null'
                          example: ''
                          description: User ID number.
                        state:
                          type:
                          - string
                          - 'null'
                          example: Active
                          description: The log�s status. Can be Active, Inactive, Rejected, or Requested.
                        malfunction:
                          type:
                          - string
                          - 'null'
                          example: None
                          description: Indicates the malfunction state of the log.
                        odometer:
                          type: number
                          format: double
                          example: 1090001.375
                          description: Odometer reading for distance traveled.
                        engineHours:
                          type: number
                          format: double
                          example: 81621
                          description: The engine hours at the time of the log. The unit is seconds (not hours).
                        eventRecordStatus:
                          type: integer
                          example: 1
                          description: The record status number of this log. 1 = active 2 = inactive - changed 3 = inactive - change requested 4 = inactive - change rejected.
                        eventCode:
                          type: integer
                          example: 3
                          description: Indicates what event occurred. Must be read in tandem with the eventType.
                        eventType:
                          type: integer
                          example: 1
                          description: Indicates what event occurred. Must be read in tandem with the eventCode.
                        shipmentCommodity:
                          type:
                          - string
                          - 'null'
                          example: Videogames
                          description: Description of the commodity.
                        shipmentDocumentNumber:
                          type:
                          - string
                          - 'null'
                          example: '1234'
                          description: The shipping document number input by the driver.
              examples:
                HosLog Data:
                  value:
                    data:
                    - userName: UnknownDriver
                      dateTime: '2023-09-21T20:30:40Z'
                      vehicleName: V-INT-FMCSA0003
                      companyId: 22048
                      editDateTime: '2023-09-21T20:36:47.566Z'
                      latitude: 32
                      longitude: -111
                      status: D
                      verifyDateTime: '0001-01-01T00:00:00Z'
                      origin: Automatic
                      state: Active
                      malfunction: None
                      odometer: 1090001.375
                      engineHours: 81621
                      eventRecordStatus: 1
                      eventCode: 3
                      eventType: 1
                      shipmentCommodity: Videogames
                      shipmentDocumentNumber: '1234'
                    - userName: UnknownDriver
                      dateTime: '2023-09-21T20:33:54Z'
                      vehicleName: V-INT-FMCSA0004
                      companyId: 22048
                      editDateTime: '2023-09-21T20:38:03.296Z'
                      latitude: 32
                      longitude: -111
                      status: D
                      verifyDateTime: '0001-01-01T00:00:00Z'
                      origin: Automatic
                      state: Active
                      malfunction: None
                      odometer: 1000000
                      engineHours: 81000
                      eventRecordStatus: 1
                      eventCode: 3
                      eventType: 1
                    - userName: UnknownDriver
                      dateTime: '2023-09-21T20:37:02Z'
                      vehicleName: V-INT-FMCSA0003
                      companyId: 22048
                      editDateTime: '2023-09-21T20:42:22.52Z'
                      latitude: 32
                      longitude: -111
                      status: 'ON'
                      verifyDateTime: '0001-01-01T00:00:00Z'
                      origin: Automatic
                      state: Active
                      malfunction: None
                      odometer: 1090001.375
                      engineHours: 81995
                      eventRecordStatus: 1
                      eventCode: 4
                      eventType: 1
                      shipmentCommodity: Videogames
                      shipmentDocumentNumber: '1234'
                Empty:
                  value:
                    data: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Bad Request Error
                  message:
                    type: string
                    example: The parameters given in the request are invalid.
              examples:
                Not Found:
                  value:
                    error: Bad Request Error
                    message: The parameters given in the request are invalid.
        '401':
          description: Unauthorized
          content:
            text/plain:
              examples:
                Unauthorized:
                  value: ''
        '403':
          description: Forbidden
          content:
            text/plain:
              examples:
                Forbidden:
                  value: ''
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Not Found Error
                  message:
                    type: string
                    example: The requested resource doesn't exist.
              examples:
                Not Found:
                  value:
                    error: Not Found Error
                    message: The requested resource doesn't exist.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: Requested operation cannot be performed.
              examples:
                Internal Server Error:
                  value:
                    error: Internal Server Error
                    message: Requested operation cannot be performed.
      security:
      - bearerAuth: []
    servers:
    - url: https://api.lytx.com
  /v1/hos/:
    get:
      tags:
      - HOS (DriveCam)
      description: This endpoint is used to retrieve HOS Logs as a batch for for the userName.
      summary: Get HOS Logs for Specified User
      operationId: Hos_GetHosLogs_ByUser
      parameters:
      - name: startDate
        in: query
        required: true
        schema:
          type: string
          format: date-time
          example: '2023-06-01'
        description: The start date.
      - name: endDate
        in: query
        required: true
        schema:
          type: string
          format: date-time
          example: '2023-06-02'
        description: End date must be within 8 days for user.
      - name: userIdentifier
        in: query
        required: true
        schema:
          type: string
          format: string
          example: UnknownDriver
        description: userName or Lytx userId.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  userName:
                    type:
                    - string
                    - 'null'
                    example: UnknownDriver
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        userName:
                          type:
                          - string
                          - 'null'
                          example: UnknownDriver
                          description: Account username.
                        dateTime:
                          type: string
                          format: date-time
                          example: '2023-09-21T20:30:40Z'
                          description: Date and time the log was created.
                        vehicleName:
                          type:
                          - string
                          - 'null'
                          example: 2015 FRD Fleet Express
                          description: Vehicle name or ID number.
                        companyId:
                          type: number
                          example: '888'
                          description: Company ID number.
                        editDateTime:
                          type: string
                          format: date-time
                          example: '2023-09-21T20:40:40Z'
                          description: The date and time the log was edited. If the log has not been edited, this will not be set.
                        latitude:
                          type: number
                          format: double
                          example: 32.887558
                          description: Latitude coordinates.
                        longitude:
                          type: number
                          format: double
                          example: -117.212288
                          description: Longitude coordinates.
                        status:
                          type:
                          - string
                          - 'null'
                          example: D
                          description: The driver�s duty status.
                        verifyDateTime:
                          type: string
                          format: date-time
                          example: '2023-01-01T00:00:00Z'
                          description: The date and time the log was verified. If the log is unverified, this will not be set.
                        origin:
                          type:
                          - string
                          - 'null'
                          example: Automatic
                          description: Indicates whether the event was generated automatically or created manually by the user.
                        serialNumber:
                          type:
                          - string
                          - 'null'
                          example: ''
                          description: The serial number of the Lytx device.
                        deviceId:
                          type:
                          - string
                          - 'null'
                          example: ''
                          description: Global unique identifier of the event recorder.
                        userId:
                          type:
                          - string
                          - 'null'
                          example: ''
                          description: User ID number.
                        state:
                          type:
                          - string
                          - 'null'
                          example: Active
                          description: The log�s status. Can be Active, Inactive, Rejected, or Requested.
                        malfunction:
                          type:
                          - string
                          - 'null'
                          example: None
                          description: Indicates the malfunction state of the log.
                        odometer:
                          type: number
                          format: double
                          example: 1090001.375
                          description: Odometer reading for distance traveled.
                        engineHours:
                          type: number
                          format: double
                          example: 81621
                          description: The engine hours at the time of the log. The unit is seconds (not hours).
                        eventRecordStatus:
                          type: integer
                          example: 1
                          description: The record status number of this log. 1 = active 2 = inactive - changed 3 = inactive - change requested 4 = inactive - change rejected.
                        eventCode:
                          type: integer
                          example: 3
                          description: Indicates what event occurred. Must be read in tandem with the eventType.
                        eventType:
                          type: integer
                          example: 1
                          description: Indicates what event occurred. Must be read in tandem with the eventCode.
                        shipmentCommodity:
                          type:
                          - string
                          - 'null'
                          example: Videogames
                          description: Description of the commodity.
                        shipmentDocumentNumber:
                          type:
                          - string
                          - 'null'
                          example: '1234'
                          description: The shipping document number input by the driver.
              examples:
                HosLog Data:
                  value:
                    data:
                    - userName: UnknownDriver
                      dateTime: '2023-09-21T20:30:40Z'
                      vehicleName: V-INT-FMCSA0003
                      companyId: 22048
                      editDateTime: '2023-09-21T20:36:47.566Z'
                      latitude: 32
                      longitude: -111
                      status: D
                      verifyDateTime: '0001-01-01T00:00:00Z'
                      origin: Automatic
                      state: Active
                      malfunction: None
                      odometer: 1090001.375
                      engineHours: 81621
                      eventRecordStatus: 1
                      eventCode: 3
                      eventType: 1
                      shipmentCommodity: Videogames
                      shipmentDocumentNumber: '1234'
                    - userName: UnknownDriver
                      dateTime: '2023-09-21T20:33:54Z'
                      vehicleName: V-INT-FMCSA0004
                      companyId: 22048
                      editDateTime: '2023-09-21T20:38:03.296Z'
                      latitude: 32
                      longitude: -111
                      status: D
                      verifyDateTime: '0001-01-01T00:00:00Z'
                      origin: Automatic
                      state: Active
                      malfunction: None
                      odometer: 1000000
                      engineHours: 81000
                      eventRecordStatus: 1
                      eventCode: 3
                      eventType: 1
                    - userName: UnknownDriver
                      dateTime: '2023-09-21T20:37:02Z'
                      vehicleName: V-INT-FMCSA0003
                      companyId: 22048
                      editDateTime: '2023-09-21T20:42:22.52Z'
                      latitude: 32
                      longitude: -111
                      status: 'ON'
                      verifyDateTime: '0001-01-01T00:00:00Z'
                      origin: Automatic
                      state: Active
                      malfunction: None
                      odometer: 1090001.375
                      engineHours: 81995
                      eventRecordStatus: 1
                      eventCode: 4
                      eventType: 1
                      shipmentCommodity: Videogames
                      shipmentDocumentNumber: '1234'
                Empty:
                  value:
                    data: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Bad Request Error
                  message:
                    type: string
                    example: The parameters given in the request are invalid.
              examples:
                Not Found:
                  value:
                    error: Bad Request Error
                    message: The parameters given in the request are invalid.
        '401':
          description: Unauthorized
          content:
            text/plain:
              examples:
                Unauthorized:
                  value: ''
        '403':
          description: Forbidden
          content:
            text/plain:
              examples:
                Forbidden:
                  value: ''
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Not Found Error
                  message:
                    type: string
                    example: The requested resource doesn't exist.
              examples:
                Not Found:
                  value:
                    error: Not Found Error
                    message: The requested resource doesn't exist.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: Requested operation cannot be performed.
              examples:
                Internal Server Error:
                  value:
                    error: Internal Server Error
                    message: Requested operation cannot be performed.
      security:
      - bearerAuth: []
    servers:
    - url: https://api.lytx.com
  /:
    get:
      tags:
      - HOS (DriveCam)
      summary: Get HOS Logs for All Users
      description: This endpoint is used to retrieve HOS Logs as a batch for all users for your company
      operationId: Hos_GetHosLogs
      parameters:
      - name: startDate
        in: query
        schema:
          type: string
          format: date-time
        required: true
        x-position: 1
      - name: endDate
        in: query
        schema:
          type: string
          format: date-time
        required: true
        description: End date must be within 1 day for company
        x-position: 2
      responses:
        '200':
          description: HOS Logs retrieved.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HosLogByCompany'
          x-expectedSchemas:
          - description: HOS Logs retrieved.
            schema:
              oneOf:
              - $ref: '#/components/schemas/HosLogByUser'
          - description: HOS Logs retrieved.
            schema:
              oneOf:
              - $ref: '#/components/schemas/HosLogByCompany'
        '204':
          description: The requested resource contained no data. The user does not have any data associated to it.
        '400':
          description: The parameters given in the request are invalid.
          content:
            application/json:
              schema:
                type: string
        '401':
          description: Can occur due to inputting an invalid key, or invalid pod
          content:
            application/json:
              schema:
                type: string
        '403':
          description: Access is denied for this API. The given APIKey's context does not have the proper permissions.
          content:
            application/json:
              schema:
                type: string
        '404':
          description: The requested resource does not exist or is not available within the given APIKey's context.
          content:
            application/json:
              schema:
                type: string
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: string
      security:
      - APIKey: []
    servers:
    - url: https://lytx-api.prod2.ph.lytx.com/hos
    - url: https://lytx-api.prod5.ph.lytx.com/hos
    - url: https://lytx-api.prod6.lv.lytx.com/hos
    - url: https://lytx-api.prod7.lv.lytx.com/hos
    - url: https://lytx-api.prod8.lv.lytx.com/hos
  /{userName}:
    get:
      tags:
      - HOS (DriveCam)
      summary: Get HOS Logs for Specified User
      description: This endpoint is used to retrieve HOS Logs for the user
      operationId: Hos_GetHosLogs_ByUser
      parameters:
      - name: userName
        in: path
        required: true
        schema:
          type:
          - string
          - 'null'
        x-position: 1
      - name: startDate
        in: query
        schema:
          type: string
          format: date-time
        required: true
        x-position: 2
      - name: endDate
        in: query
        schema:
          type: string
          format: date-time
        required: true
        description: End date must be within 8 days for user
        x-position: 3
      responses:
        '200':
          description: HOS Logs retrieved.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HosLogByUser'
          x-expectedSchemas:
          - description: HOS Logs retrieved.
            schema:
              oneOf:
              - $ref: '#/components/schemas/HosLogByUser'
          - description: HOS Logs retrieved.
            schema:
              oneOf:
              - $ref: '#/components/schemas/HosLogByCompany'
        '204':
          description: The requested resource contained no data. The user does not have any data associated to it.
        '400':
          description: The parameters given in the request are invalid.
          content:
            application/json:
              schema:
                type: string
        '401':
          description: Can occur due to inputting an invalid key, or invalid pod
          content:
            application/json:
              schema:
                type: string
        '403':
          description: Access is denied for this API. The given APIKey's context does not have the proper permissions.
          content:
            application/json:
              schema:
                type: string
        '404':
          description: The requested resource does not exist or is not available within the given APIKey's context.
          content:
            application/json:
              schema:
                type: string
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: string
      security:
      - APIKey: []
    servers:
    - url: https://lytx-api.prod2.ph.lytx.com/hos
    - url: https://lytx-api.prod5.ph.lytx.com/hos
    - url: https://lytx-api.prod6.lv.lytx.com/hos
    - url: https://lytx-api.prod7.lv.lytx.com/hos
    - url: https://lytx-api.prod8.lv.lytx.com/hos
components:
  schemas:
    HosLogByUser:
      type: object
      additionalProperties: false
      properties:
        userName:
          type:
          - string
          - 'null'
        hosLogs:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/HosLog'
    HosLogByCompany:
      type: object
      additionalProperties: false
      properties:
        users:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/HosLogByUser'
    HosLog:
      type: object
      additionalProperties: false
      properties:
        userName:
          type:
          - string
          - 'null'
        dateTime:
          type: string
          format: date-time
        vehicleName:
          type:
          - string
          - 'null'
        companyId:
          type: integer
          format: int32
        editDateTime:
          type: string
          format: date-time
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
        status:
          type:
          - string
          - 'null'
        verifyDateTime:
          type: string
          format: date-time
        origin:
          type:
          - string
          - 'null'
        serialNumber:
          type:
          - string
          - 'null'
        deviceId:
          type:
          - string
          - 'null'
        userId:
          type:
          - string
          - 'null'
        state:
          type:
          - string
          - 'null'
        malfunction:
          type:
          - string
          - 'null'
        odometer:
          type: number
          format: double
        engineHours:
          type: number
          format: float
        eventRecordStatus:
          type: integer
          format: int32
        eventCode:
          type: integer
          format: int32
        eventType:
          type: integer
          format: int32
        shipmentCommodity:
          type:
          - string
          - 'null'
        shipmentDocumentNumber:
          type:
          - string
          - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    APIKey:
      type: apiKey
      description: Enter your API key
      name: X-APIKey
      in: header
x-refined-from:
- lytx-hos-openapi.yml
- lytx-legacy.hos-openapi.yml