/** * Samsara API * # Overview Something new! Welcome Samsara\'s new and improved API. Check out our FAQ [here](https://developers.samsara.com/docs/introducing-our-next-generation-api) to see what\'s changed and learn how to get started.

Want to access the legacy API docs? You can find them [here](https://www.samsara.com/api-legacy).

*Note: Because this is a new set of APIs, we have not transitioned all endpoints over to this standard. Endpoints that still use the legacy standards are indicated in the reference documentation. If you can\'t find an API that you\'re looking for, we encourage you to look for it in our [legacy API docs](https://www.samsara.com/api-legacy) as we continue to transition all endpoints over. Check back here for updates!*

Submit your feedback [here](https://forms.gle/r4bs6HQshQAvBuwv6)!
Samsara provides API endpoints so that you can build powerful applications and custom solutions with sensor data. Samsara has endpoints available to track and analyze sensors, vehicles, and entire fleets. The Samsara API is a [RESTful API](https://en.wikipedia.org/wiki/Representational_state_transfer). It uses standard [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) authentication, verbs, and response codes, and it returns [JSON](http://www.json.org/) response bodies. If you\'re familiar with what you can build with a REST API, then this will be your go-to API reference. Visit [developers.samsara.com](https://developers.samsara.com) to find getting started guides and an API overview. If you have any questions, please visit https://samsara.com/help. ## Endpoints All our APIs can be accessed through HTTP requests to URLs like: ``` https://api.samsara.com/ ``` For EU customers, this URL will be: ``` https://api.eu.samsara.com/ ``` Note Legacy endpoints will have the URL: `https://api.samsara.com/v1/` or `https://api.eu.samsara.com/v1/` ## Authentication To authenticate your API request you will need to include your secret token. You can manage your API tokens in the [Dashboard](https://cloud.samsara.com). They are visible under `Settings->Organization->API Tokens`. Your API tokens carry many privileges, so be sure to keep them secure. Do not share your secret API tokens in publicly accessible areas such as GitHub, client-side code, and so on. Authentication to the API is performed via Bearer Token in the HTTP Authorization header. Provide your API token as the `access_token` value in an `Authorization: Bearer` header. You do not need to provide a password: ```curl Authorization: Bearer {access_token} ``` All API requests must be made over [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP or without authentication will fail. ### OAuth2 If building an application for our marketplace, our API is accessible via. OAuth2 as well. | Type | Value | | ------------- |:-------------:| | Security scheme | OAuth2 | | OAuth2 Flow | accessCode | | Authorization URL | https://api.samsara.com/oauth2/authorize | | Token URL | https://api.samsara.com/oauth2/token | ## Common Patterns You can find more info about request methods, response codes, error codes, versioning, pagination, timestamps, and mini-objects [here](https://developers.samsara.com/docs/common-structures). * * The version of the OpenAPI document: 2024-11-18 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { DriverObjectResponseBody } from './driver-object-response-body'; import { GoaAttributeTinyResponseBody } from './goa-attribute-tiny-response-body'; import { GoaGatewayTinyResponseResponseBody } from './goa-gateway-tiny-response-response-body'; import { GoaTagTinyResponseResponseBody } from './goa-tag-tiny-response-response-body'; import { VehicleSensorConfigurationResponseBody } from './vehicle-sensor-configuration-response-body'; /** * A single vehicle * @export * @interface VehicleResponseObjectResponseBody */ export interface VehicleResponseObjectResponseBody { /** * List of attributes associated with the entity * @type {Array} * @memberof VehicleResponseObjectResponseBody */ 'attributes'?: Array; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType1'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType10'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType11'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType12'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType13'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType2'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType3'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType4'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType5'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType6'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType7'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType8'?: string; /** * The type of auxiliary input configured for this Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'auxInputType9'?: string; /** * The serial number of the camera installed in the vehicle * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'cameraSerial'?: string; /** * Time the vehicle was created in RFC 3339 format. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'createdAtTime': string; /** * Engine serial number. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'esn'?: string; /** * A map of external ids * @type {{ [key: string]: string; }} * @memberof VehicleResponseObjectResponseBody */ 'externalIds'?: { [key: string]: string; }; /** * * @type {GoaGatewayTinyResponseResponseBody} * @memberof VehicleResponseObjectResponseBody */ 'gateway'?: GoaGatewayTinyResponseResponseBody; /** * The harsh acceleration setting type. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'harshAccelerationSettingType'?: string; /** * ID of the vehicle * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'id': string; /** * The license plate of the vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'licensePlate'?: string; /** * The Vehicle’s manufacturing make. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'make'?: string; /** * The Vehicle’s manufacturing model. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'model'?: string; /** * Name of the vehicle * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'name'?: string; /** * These are generic notes about the Vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'notes'?: string; /** * * @type {VehicleSensorConfigurationResponseBody} * @memberof VehicleResponseObjectResponseBody */ 'sensorConfiguration'?: VehicleSensorConfigurationResponseBody; /** * The serial number of the gateway installed in the vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'serial'?: string; /** * * @type {DriverObjectResponseBody} * @memberof VehicleResponseObjectResponseBody */ 'staticAssignedDriver'?: DriverObjectResponseBody; /** * The list of tags associated with the Vehicle. * @type {Array} * @memberof VehicleResponseObjectResponseBody */ 'tags'?: Array; /** * Time the vehicle was updated in RFC 3339 format. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'updatedAtTime'?: string; /** * Whether the vehicle is regulated or unregulated (non-CMV). Valid values: `regulated`, `unregulated` * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'vehicleRegulationMode'?: VehicleResponseObjectResponseBodyVehicleRegulationModeEnum; /** * The type of the vehicle. Only returned for customers with commercial speed limits (CSL) enabled. Valid values: `unset`, `passenger`, `truck`, `bus` * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'vehicleType'?: VehicleResponseObjectResponseBodyVehicleTypeEnum; /** * The weight of the vehicle in either pounds (lb) or kilograms (kg). Unit of weight is unknown. Only returned for customers with commercial speed limits (CSL) enabled. * @type {number} * @memberof VehicleResponseObjectResponseBody */ 'vehicleWeight'?: number; /** * The weight of the vehicle in kilograms (kg). Only returned for customers with commercial speed limits (CSL) enabled. * @type {number} * @memberof VehicleResponseObjectResponseBody */ 'vehicleWeightInKilograms'?: number; /** * The weight of the vehicle in pounds (lb). Only returned for customers with commercial speed limits (CSL) enabled. * @type {number} * @memberof VehicleResponseObjectResponseBody */ 'vehicleWeightInPounds'?: number; /** * The VIN of the vehicle. * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'vin'?: string; /** * * @type {string} * @memberof VehicleResponseObjectResponseBody */ 'year'?: string; } export declare const VehicleResponseObjectResponseBodyVehicleRegulationModeEnum: { readonly Regulated: "regulated"; readonly Unregulated: "unregulated"; }; export type VehicleResponseObjectResponseBodyVehicleRegulationModeEnum = typeof VehicleResponseObjectResponseBodyVehicleRegulationModeEnum[keyof typeof VehicleResponseObjectResponseBodyVehicleRegulationModeEnum]; export declare const VehicleResponseObjectResponseBodyVehicleTypeEnum: { readonly Unset: "unset"; readonly Passenger: "passenger"; readonly Truck: "truck"; readonly Bus: "bus"; }; export type VehicleResponseObjectResponseBodyVehicleTypeEnum = typeof VehicleResponseObjectResponseBodyVehicleTypeEnum[keyof typeof VehicleResponseObjectResponseBodyVehicleTypeEnum];