/** * 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. */ /** * US Driver Ruleset override for a given driver. If the driver is operating under a ruleset different from the organization default, the override is used. Updating this value only updates the override setting for this driver. Explicitly setting this field to `null` will delete driver\'s ruleset override. If the driver does not have an override ruleset set, the response will not include any usDriverRulesetOverride information. * @export * @interface UsDriverRulesetOverride */ export interface UsDriverRulesetOverride { /** * The driver\'s working cycle. Valid values: `USA Property (8/70)`, `USA Property (7/60)`, `USA Passenger (8/70)`, `USA Passenger (7/60)`, `Alaska Property (8/80)`, `Alaska Property (7/70)`, `Alaska Passenger (8/80)`, `Alaska Passenger (7/70)`, `California School/FLV (8/80)`, `California Farm (8/112)`, `California Property (8/80)`, `California Flammable Liquid (8/80)`, `California Passenger (8/80)`, `California Motion Picture (8/80)`, `Florida (8/80)`, `Florida (7/70)`, `Nebraska (8/80)`, `Nebraska (7/70)`, `North Carolina (8/80)`, `North Carolina (7/70)`, `Oklahoma (8/70)`, `Oklahoma (7/60)`, `Oregon (8/80)`, `Oregon (7/70)`, `South Carolina (8/80)`, `South Carolina (7/70)`, `Texas (7/70)`, `Wisconsin (8/80)`, `Wisconsin (7/70)` * @type {string} * @memberof UsDriverRulesetOverride */ 'cycle': UsDriverRulesetOverrideCycleEnum; /** * Amount of time necessary for the driver to be resting in order to restart their cycle. Valid values: `34-hour Restart`, `24-hour Restart`, `36-hour Restart`, `72-hour Restart`, `None`. * @type {string} * @memberof UsDriverRulesetOverride */ 'restart': UsDriverRulesetOverrideRestartEnum; /** * The restbreak required for this driver. Valid values: `Property (off-duty/sleeper)`, `California Mealbreak (off-duty/sleeper)`, `None`. * @type {string} * @memberof UsDriverRulesetOverride */ 'restbreak': UsDriverRulesetOverrideRestbreakEnum; /** * The jurisdiction of the ruleset applied to this driver. These are specified by either the ISO 3166-2 postal code for the supported US states, or empty string \'\' for US Federal Ruleset jurisdiction. Valid values: ``, `AK`, `CA`, `FL`, `NE`, `NC`, `OK`, `OR`, `SC`, `TX`, `WI`. * @type {string} * @memberof UsDriverRulesetOverride */ 'usStateToOverride': UsDriverRulesetOverrideUsStateToOverrideEnum; } export declare const UsDriverRulesetOverrideCycleEnum: { readonly UsaProperty870: "USA Property (8/70)"; readonly UsaProperty760: "USA Property (7/60)"; readonly UsaPassenger870: "USA Passenger (8/70)"; readonly UsaPassenger760: "USA Passenger (7/60)"; readonly AlaskaProperty880: "Alaska Property (8/80)"; readonly AlaskaProperty770: "Alaska Property (7/70)"; readonly AlaskaPassenger880: "Alaska Passenger (8/80)"; readonly AlaskaPassenger770: "Alaska Passenger (7/70)"; readonly CaliforniaSchoolFlv880: "California School/FLV (8/80)"; readonly CaliforniaFarm8112: "California Farm (8/112)"; readonly CaliforniaProperty880: "California Property (8/80)"; readonly CaliforniaFlammableLiquid880: "California Flammable Liquid (8/80)"; readonly CaliforniaPassenger880: "California Passenger (8/80)"; readonly CaliforniaMotionPicture880: "California Motion Picture (8/80)"; readonly Florida880: "Florida (8/80)"; readonly Florida770: "Florida (7/70)"; readonly Nebraska880: "Nebraska (8/80)"; readonly Nebraska770: "Nebraska (7/70)"; readonly NorthCarolina880: "North Carolina (8/80)"; readonly NorthCarolina770: "North Carolina (7/70)"; readonly Oklahoma870: "Oklahoma (8/70)"; readonly Oklahoma760: "Oklahoma (7/60)"; readonly Oregon880: "Oregon (8/80)"; readonly Oregon770: "Oregon (7/70)"; readonly SouthCarolina880: "South Carolina (8/80)"; readonly SouthCarolina770: "South Carolina (7/70)"; readonly Texas770: "Texas (7/70)"; readonly Wisconsin880: "Wisconsin (8/80)"; readonly Wisconsin770: "Wisconsin (7/70)"; }; export type UsDriverRulesetOverrideCycleEnum = typeof UsDriverRulesetOverrideCycleEnum[keyof typeof UsDriverRulesetOverrideCycleEnum]; export declare const UsDriverRulesetOverrideRestartEnum: { readonly _34HourRestart: "34-hour Restart"; readonly _24HourRestart: "24-hour Restart"; readonly _36HourRestart: "36-hour Restart"; readonly _72HourRestart: "72-hour Restart"; readonly None: "None"; }; export type UsDriverRulesetOverrideRestartEnum = typeof UsDriverRulesetOverrideRestartEnum[keyof typeof UsDriverRulesetOverrideRestartEnum]; export declare const UsDriverRulesetOverrideRestbreakEnum: { readonly PropertyOffDutySleeper: "Property (off-duty/sleeper)"; readonly CaliforniaMealbreakOffDutySleeper: "California Mealbreak (off-duty/sleeper)"; readonly None: "None"; }; export type UsDriverRulesetOverrideRestbreakEnum = typeof UsDriverRulesetOverrideRestbreakEnum[keyof typeof UsDriverRulesetOverrideRestbreakEnum]; export declare const UsDriverRulesetOverrideUsStateToOverrideEnum: { readonly Empty: ""; readonly Ak: "AK"; readonly Ca: "CA"; readonly Fl: "FL"; readonly Ne: "NE"; readonly Nc: "NC"; readonly Ok: "OK"; readonly Or: "OR"; readonly Sc: "SC"; readonly Tx: "TX"; readonly Wi: "WI"; }; export type UsDriverRulesetOverrideUsStateToOverrideEnum = typeof UsDriverRulesetOverrideUsStateToOverrideEnum[keyof typeof UsDriverRulesetOverrideUsStateToOverrideEnum];