/** * 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 { AccessoryResponseObjectResponseBody } from './accessory-response-object-response-body'; import { ConnectionStatusResponseObjectResponseBody } from './connection-status-response-object-response-body'; import { DataUsageResponseObjectResponseBody } from './data-usage-response-object-response-body'; import { GatewayAssetResponseObjectResponseBody } from './gateway-asset-response-object-response-body'; /** * * @export * @interface GatewayResponseObjectResponseBody */ export interface GatewayResponseObjectResponseBody { /** * Accessory devices on gateway * @type {Array} * @memberof GatewayResponseObjectResponseBody */ 'accessoryDevices'?: Array; /** * * @type {GatewayAssetResponseObjectResponseBody} * @memberof GatewayResponseObjectResponseBody */ 'asset'?: GatewayAssetResponseObjectResponseBody; /** * * @type {ConnectionStatusResponseObjectResponseBody} * @memberof GatewayResponseObjectResponseBody */ 'connectionStatus'?: ConnectionStatusResponseObjectResponseBody; /** * * @type {DataUsageResponseObjectResponseBody} * @memberof GatewayResponseObjectResponseBody */ 'dataUsageLast30Days'?: DataUsageResponseObjectResponseBody; /** * The model of the gateway installed on the asset. Valid values: `AG15`, `AG24`, `AG24EU`, `AG26`, `AG26EU`, `AG41`, `AG41EU`, `AG45`, `AG45EU`, `AG46`, `AG46EU`, `AG46P`, `AG46PEU`, `AG51`, `AG51EU`, `AG52`, `AG52EU`, `AG53`, `AG53EU`, `IG15`, `IG21`, `IG41`, `IG61`, `SG1`, `SG1B`, `SG1G`, `SG1G32`, `SG1x`, `VG32`, `VG33`, `VG34`, `VG34EU`, `VG34FN`, `VG34M`, `VG54ATT`, `VG54EU`, `VG54FN`, `VG54NA`, `VG54NAE`, `VG54NAH`, `VG55EU`, `VG55FN`, `VG55NA` * @type {string} * @memberof GatewayResponseObjectResponseBody */ 'model': GatewayResponseObjectResponseBodyModelEnum; /** * The serial number of the gateway installed on the asset. * @type {string} * @memberof GatewayResponseObjectResponseBody */ 'serial': string; } export declare const GatewayResponseObjectResponseBodyModelEnum: { readonly Ag15: "AG15"; readonly Ag24: "AG24"; readonly Ag24Eu: "AG24EU"; readonly Ag26: "AG26"; readonly Ag26Eu: "AG26EU"; readonly Ag41: "AG41"; readonly Ag41Eu: "AG41EU"; readonly Ag45: "AG45"; readonly Ag45Eu: "AG45EU"; readonly Ag46: "AG46"; readonly Ag46Eu: "AG46EU"; readonly Ag46P: "AG46P"; readonly Ag46Peu: "AG46PEU"; readonly Ag51: "AG51"; readonly Ag51Eu: "AG51EU"; readonly Ag52: "AG52"; readonly Ag52Eu: "AG52EU"; readonly Ag53: "AG53"; readonly Ag53Eu: "AG53EU"; readonly Ig15: "IG15"; readonly Ig21: "IG21"; readonly Ig41: "IG41"; readonly Ig61: "IG61"; readonly Sg1: "SG1"; readonly Sg1B: "SG1B"; readonly Sg1G: "SG1G"; readonly Sg1G32: "SG1G32"; readonly Sg1x: "SG1x"; readonly Vg32: "VG32"; readonly Vg33: "VG33"; readonly Vg34: "VG34"; readonly Vg34Eu: "VG34EU"; readonly Vg34Fn: "VG34FN"; readonly Vg34M: "VG34M"; readonly Vg54Att: "VG54ATT"; readonly Vg54Eu: "VG54EU"; readonly Vg54Fn: "VG54FN"; readonly Vg54Na: "VG54NA"; readonly Vg54Nae: "VG54NAE"; readonly Vg54Nah: "VG54NAH"; readonly Vg55Eu: "VG55EU"; readonly Vg55Fn: "VG55FN"; readonly Vg55Na: "VG55NA"; }; export type GatewayResponseObjectResponseBodyModelEnum = typeof GatewayResponseObjectResponseBodyModelEnum[keyof typeof GatewayResponseObjectResponseBodyModelEnum];