# Get HOS logs

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /openapi/hos/logs/:
    get:
      summary: Get HOS logs
      deprecated: false
      description: >-
        Returns HOS logs between a given startedAfter and startedBefore. The
        logs can be further filtered using tags or by providing a list of driver
        IDs.
      operationId: hos_logs_list
      tags:
        - Hours Of Service
        - Hours Of Service
      parameters:
        - name: page
          in: query
          description: A page number within the paginated result set.
          required: false
          schema:
            type: integer
        - name: page_size
          in: query
          description: Number of results to return per page.
          required: false
          schema:
            type: integer
        - name: driverIds
          in: query
          description: ''
          required: true
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: startedAfter
          in: query
          description: '2024-05-22T01:40:16.274753Z'
          required: false
          schema:
            type: string
            format: date-time
        - name: startedBefore
          in: query
          description: '2024-05-22T01:40:16.274753Z'
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedHosLogsResponseList'
              examples:
                HOSLogsResponse:
                  summary: HOS Logs Response
                  value:
                    count: 10
                    page_size: 123
                    previous: null
                    current: 1
                    next: 2
                    results:
                      - count: 10
                        page_size: 50
                        previous: null
                        current: 1
                        next: 2
                        results:
                          - id: 880e8400-e29b-41d4-a716-446655440000
                            driver: 660e8400-e29b-41d4-a716-446655440001
                            vehicle: 770e8400-e29b-41d4-a716-446655440002
                            codrivers: []
                            startedAt: '2024-01-15T08:00:00.000Z'
                            endedAt: '2024-01-15T08:30:00.000Z'
                            location:
                              latitude: 30.2672
                              longitude: -97.7431
                            address:
                              formatted: 1.5 miles from Austin, TX
                            status: driving
                            remark: ''
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: Hours Of Service
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/586350/apis/api-8318758-run
components:
  schemas:
    PaginatedHosLogsResponseList:
      type: object
      properties:
        count:
          type: integer
          examples:
            - 10
        page_size:
          type: integer
          examples:
            - 123
        previous:
          type: integer
          examples:
            - null
          nullable: true
        current:
          type: integer
          examples:
            - 1
        next:
          type: integer
          examples:
            - 2
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/HosLogsResponse'
      x-apidog-orders:
        - count
        - page_size
        - previous
        - current
        - next
        - results
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    HosLogsResponse:
      type: object
      properties:
        id:
          type: string
        driver:
          type: string
          description: Driver ID
          nullable: true
        vehicle:
          type: string
          description: Vehicle ID
          nullable: true
        codrivers:
          type: array
          items:
            type: string
          readOnly: true
          description: Co Driver ID
        startedAt:
          type: string
          format: date-time
        endedAt:
          type: string
          format: date-time
        location:
          allOf:
            - $ref: '#/components/schemas/HosLogLocation'
          readOnly: true
        address:
          allOf:
            - $ref: '#/components/schemas/HosLogAddress'
          readOnly: true
        status:
          $ref: '#/components/schemas/StatusEnum'
        remark:
          type: string
          description: Remark
      required:
        - id
        - driver
        - vehicle
        - codrivers
        - location
        - address
        - status
        - remark
      x-apidog-orders:
        - id
        - driver
        - vehicle
        - codrivers
        - startedAt
        - endedAt
        - location
        - address
        - status
        - remark
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    StatusEnum:
      enum:
        - offDuty
        - sleepingBed
        - driving
        - onDuty
        - intermediateW/CLP
        - intermediateW/RLP
        - personalConveyance
        - yardMove
        - certification
        - login
        - logout
        - enginePowerUpW/CLP
        - enginePowerUpW/RLP
        - engineShutDownW/CLP
        - engineShutDownW/RLP
        - malfunctionLogged
        - malfunctionCleared
        - diagnosticEventLogged
        - diagnosticEventCleared
      type: string
      description: |-
        * `offDuty` - offDuty
        * `sleepingBed` - sleepingBed
        * `driving` - driving
        * `onDuty` - onDuty
        * `intermediateW/CLP` - intermediateW/CLP
        * `intermediateW/RLP` - intermediateW/RLP
        * `personalConveyance` - personalConveyance
        * `yardMove` - yardMove
        * `certification` - certification
        * `login` - login
        * `logout` - logout
        * `enginePowerUpW/CLP` - enginePowerUpW/CLP
        * `enginePowerUpW/RLP` - enginePowerUpW/RLP
        * `engineShutDownW/CLP` - engineShutDownW/CLP
        * `engineShutDownW/RLP` - engineShutDownW/RLP
        * `malfunctionLogged` - malfunctionLogged
        * `malfunctionCleared` - malfunctionCleared
        * `diagnosticEventLogged` - diagnosticEventLogged
        * `diagnosticEventCleared` - diagnosticEventCleared
      x-apidog-folder: ''
    HosLogAddress:
      type: object
      description: Address with formatted string for HOS logs.
      properties:
        formatted:
          type: string
          description: Human-readable address (e.g. '1.5 miles from Austin, TX')
          nullable: true
      x-apidog-orders:
        - formatted
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    HosLogLocation:
      type: object
      description: Location coordinates for HOS logs.
      properties:
        latitude:
          type: number
          format: double
          nullable: true
        longitude:
          type: number
          format: double
          nullable: true
      required:
        - latitude
        - longitude
      x-apidog-orders:
        - latitude
        - longitude
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.firsteld.com
    description: Prod Env
security: []

```
