Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseAPI
    • HoursOfServiceApi

Index

Constructors

constructor

Properties

Protected configuration

configuration: Configuration = ...

Methods

getHosClocks

getHosClocksRaw

  • getHosClocksRaw(requestParameters: GetHosClocksRequest): Promise<ApiResponse<HosClocksResponse>>

getHosDailyLogs

  • getHosDailyLogs(requestParameters: GetHosDailyLogsRequest): Promise<HosDailyLogsGetHosDailyLogsResponseBody>
  • Get summarized daily Hours of Service charts for the specified drivers. The time range for a log is defined by the driver's eldDayStartHour. This value is configurable per driver. The startDate and endDate parameters indicate the date range you'd like to retrieve daily logs for. A daily log will be returned if its startTime is on any of the days within in this date range (inclusive of startDate and endDate). 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. If you are using the legacy version of this endpoint and looking for its documentation, you can find it here. Get all driver HOS daily logs

    Parameters

    Returns Promise<HosDailyLogsGetHosDailyLogsResponseBody>

getHosDailyLogsRaw

  • getHosDailyLogsRaw(requestParameters: GetHosDailyLogsRequest): Promise<ApiResponse<HosDailyLogsGetHosDailyLogsResponseBody>>
  • Get summarized daily Hours of Service charts for the specified drivers. The time range for a log is defined by the driver's eldDayStartHour. This value is configurable per driver. The startDate and endDate parameters indicate the date range you'd like to retrieve daily logs for. A daily log will be returned if its startTime is on any of the days within in this date range (inclusive of startDate and endDate). 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. If you are using the legacy version of this endpoint and looking for its documentation, you can find it here. Get all driver HOS daily logs

    Parameters

    Returns Promise<ApiResponse<HosDailyLogsGetHosDailyLogsResponseBody>>

getHosLogs

  • 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. 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. Get HOS logs

    Parameters

    Returns Promise<HosLogsResponse>

getHosLogsRaw

  • getHosLogsRaw(requestParameters: GetHosLogsRequest): Promise<ApiResponse<HosLogsResponse>>
  • 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. 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. Get HOS logs

    Parameters

    Returns Promise<ApiResponse<HosLogsResponse>>

Protected request

  • request(context: RequestOpts): Promise<Response>
  • Parameters

    • context: RequestOpts

    Returns Promise<Response>

setCurrentDutyStatus

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Set an individual driver’s current duty status to 'On Duty' or 'Off Duty'. To ensure compliance with the ELD Mandate, only authenticated drivers can make direct duty status changes on their own logbook. Any system external to the Samsara Driver App using this endpoint to trigger duty status changes must ensure that such changes are only triggered directly by the driver in question and that the driver has been properly authenticated. This endpoint should not be used to algorithmically trigger duty status changes nor should it be used by personnel besides the driver to trigger duty status changes on the driver’s behalf. Carriers and their drivers are ultimately responsible for maintaining accurate logs and should confirm that their use of the endpoint is compliant with the ELD Mandate. Set a duty status for a specific driver

    Parameters

    Returns Promise<void>

setCurrentDutyStatusRaw

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Set an individual driver’s current duty status to 'On Duty' or 'Off Duty'. To ensure compliance with the ELD Mandate, only authenticated drivers can make direct duty status changes on their own logbook. Any system external to the Samsara Driver App using this endpoint to trigger duty status changes must ensure that such changes are only triggered directly by the driver in question and that the driver has been properly authenticated. This endpoint should not be used to algorithmically trigger duty status changes nor should it be used by personnel besides the driver to trigger duty status changes on the driver’s behalf. Carriers and their drivers are ultimately responsible for maintaining accurate logs and should confirm that their use of the endpoint is compliant with the ELD Mandate. Set a duty status for a specific driver

    Parameters

    Returns Promise<ApiResponse<void>>

v1getFleetHosAuthenticationLogs

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Get the HOS (hours of service) signin and signout logs for the specified driver. The response includes 4 fields that are now deprecated. 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. Get HOS signin and signout

    Parameters

    Returns Promise<V1HosAuthenticationLogsResponse>

v1getFleetHosAuthenticationLogsRaw

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Get the HOS (hours of service) signin and signout logs for the specified driver. The response includes 4 fields that are now deprecated. 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. Get HOS signin and signout

    Parameters

    Returns Promise<ApiResponse<V1HosAuthenticationLogsResponse>>

withMiddleware

  • withMiddleware<T>(...middlewares: Middleware[]): T
  • Type parameters

    • T: BaseAPI<T>

    Parameters

    • Rest ...middlewares: Middleware[]

    Returns T

withPostMiddleware

  • withPostMiddleware<T>(...postMiddlewares: ((context: ResponseContext) => Promise<void | Response>)[]): T
  • Type parameters

    • T: BaseAPI<T>

    Parameters

    • Rest ...postMiddlewares: ((context: ResponseContext) => Promise<void | Response>)[]

    Returns T

withPreMiddleware

  • withPreMiddleware<T>(...preMiddlewares: ((context: RequestContext) => Promise<void | FetchParams>)[]): T
  • Type parameters

    • T: BaseAPI<T>

    Parameters

    • Rest ...preMiddlewares: ((context: RequestContext) => Promise<void | FetchParams>)[]

    Returns T

Generated using TypeDoc