Hours of Service

Get HOS clocks

Get the current HOS status for all drivers. Note that this includes inactive as well as active drivers. The legacy version of this endpoint can be found at samsara.com/api-legacy.

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>

get/fleet/hos/clocks

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

tagIdsstring[]

A filter on the data based on this comma-separated list of tag IDs. Example: tagIds=1234,5678

parentTagIdsstring[]

A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: parentTagIds=345,678

driverIdsstring[]

A filter on the data based on this comma-separated list of driver IDs. Example: driverIds=1234,5678

afterstring

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

limitinteger

The limit for how many objects will be in the response. Default and max for this value is 512 objects.

Response

List of current HOS clock information for the specified drivers.

Example response

{
  "data": [
    {
      "clocks": {
        "break": {
          "timeUntilBreakDurationMs": 28800000
        },
        "cycle": {
          "cycleRemainingDurationMs": 252000000,
          "cycleStartedAtTime": "2020-01-27T07:06:25Z",
          "cycleTomorrowDurationMs": 252000000
        },
        "drive": {
          "driveRemainingDurationMs": 39600000
        },
        "shift": {
          "shiftRemainingDurationMs": 50400000
        }
      },
      "currentDutyStatus": {
        "hosStatusType": "offDuty"
      },
      "currentVehicle": {
        "ExternalIds": {
          "maintenanceId": "250020",
          "payrollId": "ABFS18600"
        },
        "id": "123456789",
        "name": "Midwest Truck #4"
      },
      "driver": {
        "id": "88668",
        "name": "Susan Bob"
      },
      "violations": {
        "cycleViolationDurationMs": 39600000,
        "shiftDrivingViolationDurationMs": 39600000
      }
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.