Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseAPI
    • VehicleLocationsApi

Index

Constructors

constructor

Properties

Protected configuration

configuration: Configuration = ...

Methods

getVehicleLocations

  • NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new Vehicle Stats API instead. Returns the last known location of all vehicles at the given time. If no time is specified, the current time is used. This can be optionally filtered by tags or specific vehicle IDs. Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations. Locations snapshot

    Parameters

    Returns Promise<VehicleLocationsResponse>

getVehicleLocationsFeed

  • NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new Vehicle Stats API instead. Follow a continuous feed of all vehicle locations from Samsara Vehicle Gateways. Your first call to this endpoint will provide you with the most recent location for each vehicle and a pagination object that contains an endCursor. You can provide the endCursor to the after parameter of this endpoint to get location updates since that endCursor. If hasNextPage is false, no updates are readily available yet. We'd suggest waiting a minimum of 5 seconds before requesting updates. Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations. Locations feed

    Parameters

    Returns Promise<VehicleLocationsListResponse>

getVehicleLocationsFeedRaw

  • NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new Vehicle Stats API instead. Follow a continuous feed of all vehicle locations from Samsara Vehicle Gateways. Your first call to this endpoint will provide you with the most recent location for each vehicle and a pagination object that contains an endCursor. You can provide the endCursor to the after parameter of this endpoint to get location updates since that endCursor. If hasNextPage is false, no updates are readily available yet. We'd suggest waiting a minimum of 5 seconds before requesting updates. Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations. Locations feed

    Parameters

    Returns Promise<ApiResponse<VehicleLocationsListResponse>>

getVehicleLocationsHistory

  • NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new Vehicle Stats API instead. Returns all known vehicle locations during the given time range. This can be optionally filtered by tags or specific vehicle IDs. Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations. Historical locations

    Parameters

    Returns Promise<VehicleLocationsListResponse>

getVehicleLocationsHistoryRaw

  • NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new Vehicle Stats API instead. Returns all known vehicle locations during the given time range. This can be optionally filtered by tags or specific vehicle IDs. Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations. Historical locations

    Parameters

    Returns Promise<ApiResponse<VehicleLocationsListResponse>>

getVehicleLocationsRaw

  • NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new Vehicle Stats API instead. Returns the last known location of all vehicles at the given time. If no time is specified, the current time is used. This can be optionally filtered by tags or specific vehicle IDs. Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations. Locations snapshot

    Parameters

    Returns Promise<ApiResponse<VehicleLocationsResponse>>

Protected request

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

    • context: RequestOpts

    Returns Promise<Response>

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