{ "opencollection": "1.0.0", "info": { "name": "Samsara Hours Of Service API", "version": "2024-11-18" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Hours Of Service", "type": "folder" }, "items": [ { "info": { "name": "Get HOS Clocks", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/fleet/hos/clocks", "params": [ { "name": "tagIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`" }, { "name": "parentTagIds", "value": "", "type": "query", "description": "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`" }, { "name": "driverIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=1234,5678`" }, { "name": "after", "value": "", "type": "query", "description": "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." }, { "name": "limit", "value": "", "type": "query", "description": "The limit for how many objects will be in the response. Default and max for this value is 512 objects." } ] }, "docs": "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](https://www.samsara.com/api-legacy#operation/getFleetHosLogsSummary). \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API " }, { "info": { "name": "Get HOS Logs", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/fleet/hos/logs", "params": [ { "name": "tagIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`" }, { "name": "parentTagIds", "value": "", "type": "query", "description": "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`" }, { "name": "driverIds", "value": "", "type": "query", "description": "A filter on the data based on this comma-separated list of driver IDs. Example: `driverIds=1234,5678`" }, { "name": "startTime", "value": "", "type": "query", "description": "A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00)." }, { "name": "endTime", "value": "", "type": "query", "description": "An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00)." }, { "name": "after", "value": "", "type": "query", "description": "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." } ] }, "docs": "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).\n\n**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 befo" }, { "info": { "name": "Get All Driver HOS Violations", "type": "http" }, "http": { "method": "GET", "url": "https://api.samsara.com/fleet/hos/violations", "params": [ { "name": "driverIds", "value": "", "type": "query", "description": " A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`" }, { "name": "startTime", "value": "", "type": "query", "description": " A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00)." }, { "name": "endTime", "value": "", "type": "query", "description": " An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00)." }, { "name": "tagIds", "value": "", "type": "query", "description": " A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`" }, { "name": "parentTagIds", "value": "", "type": "query", "description": " 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`" }, { "name": "types", "value": "", "type": "query", "description": "A filter on violations data based on the violation type enum. Supported types: `NONE, californiaMealbreakMissed, cycleHoursOn, cycleOffHoursAfterOnDutyHours, dailyDrivingHours, dailyOffDutyDeferralAddToDay2Consecutive, dailyOffDutyDeferralNotPartMandatory, dailyOffDutyDeferralTwoDayDrivingLimit, dailyOffDutyDeferralTwoDayOffDuty, dailyOffDutyNonResetHours, dailyOffDutyTotalHours, dailyOnDutyHours, mandatory24HoursOffDuty, restbreakMissed, shiftDrivingHours, shiftHours, shiftOnDutyHours, unsubmittedLogs`" }, { "name": "after", "value": "", "type": "query", "description": " 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." } ] }, "docs": "Get active Hours of Service violations for the specified drivers.\n\nThe day object time range for a violation is defined by the `driver`'s `eldDayStartHour`. This value is configurable per driver.\n\nThe `startTime` and `endTime` parameters indicate the datetime range you'd like to retrieve violations for. A violation will be returned if its `violationStartTime` falls within this datetime range (inclusive of `startTime` and `endTime`) \n\n**Note:** The following are all the violation types with a sho" } ] } ], "bundled": true }