---
title: "Get HOS logs"
method: GET
path: "/fleet/hos/logs"
tags: ["Hours of Service"]
---

# Get HOS logs

`GET /fleet/hos/logs`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/hos/logs`
- Auth: HTTP bearer

Returns HOS logs between a given `startTime` and `endTime`. The logs can be further filtered using tags or by providing a list of driver IDs (including external IDs). The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getFleetHosLogs).

**Note:** If data is still being uploaded from the Samsara Driver App, it may not be completely reflected in the response from this endpoint. The best practice is to wait a couple of days before querying this endpoint to make sure that all data from the Samsara Driver App has been uploaded. 

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>). 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select **Read ELD Compliance Settings (US)** under the Compliance category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

## Query parameters

- `tagIds` string[]
- `parentTagIds` string[]
- `driverIds` string[]
- `startTime` string
- `endTime` string
- `after` string

## Response `200`

List of the last known HOS log entries for the specified drivers.

- HosLogsResponse: HOS logs and pagination info.
  - `data` HosLogsForDriver[], required: List of HOS logs for the specified drivers.
    - `driver` DriverTinyResponse: A minified driver object.
      - `id` string: ID of the driver.
      - `name` string: Name of the driver.
    - `hosLogs` HosLogEntry[]: List of HOS log entries.
      - `codrivers` DriverTinyResponse[]: The codriver information.
        - `id` string: ID of the driver.
        - `name` string: Name of the driver.
      - `hosStatusType` 'offDuty' | 'sleeperBed' | 'driving' | 'onDuty' | 'yardMove' | 'personalConveyance': The Hours of Service status type. Valid values: `offDuty`, `sleeperBed`, `driving`, `onDuty`, `yardMove`, `personalConveyance`.
      - `logEndTime` string: UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
      - `logRecordedLocation` HosLogLocation: Location associated with the duty status change
        - `latitude` number, double, required: GPS latitude represented in degrees
        - `longitude` number, double, required: GPS longitude represented in degrees
      - `logStartTime` string, required: UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
      - `remark` string: Remark associated with the log entry.
      - `vehicle` VehicleTinyResponse: A minified vehicle object.
        - `ExternalIds` object: The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object.
        - `id` string: ID of the vehicle.
        - `name` string: Name of the vehicle.
  - `pagination` PaginationResponse, required: Pagination parameters.
    - `endCursor` string, string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
