/**
* 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 type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { RequestArgs, BaseAPI } from '../base';
import { InlineObject4 } from '../samsara-models';
import { InlineObject5 } from '../samsara-models';
import { InlineObject6 } from '../samsara-models';
import { InlineObject7 } from '../samsara-models';
import { InlineObject8 } from '../samsara-models';
import { InlineResponse2009 } from '../samsara-models';
import { V1CargoResponse } from '../samsara-models';
import { V1DoorResponse } from '../samsara-models';
import { V1HumidityResponse } from '../samsara-models';
import { V1SensorHistoryResponse } from '../samsara-models';
import { V1TemperatureResponse } from '../samsara-models';
/**
* SensorsApi - axios parameter creator
* @export
*/
export declare const SensorsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* This endpoint is still on our legacy API. Get sensor objects. This method returns a list of the sensor objects in the Samsara Cloud and information about them. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get all sensors
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensors: (options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Get cargo monitor status (empty / full) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get cargo status
* @param {InlineObject4} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsCargo: (v1sensorParam: InlineObject4, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Get door monitor status (closed / open) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get door status
* @param {InlineObject5} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsDoor: (v1sensorParam: InlineObject5, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Get historical data for specified sensors. This method returns a set of historical data for the specified sensors in the specified time range and at the specified time resolution. Rate limit: 100 requests/sec (learn more about rate limits here). **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get sensor history
* @param {InlineObject6} historyParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsHistory: (historyParam: InlineObject6, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Get humidity for requested sensors. This method returns the current relative humidity for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get humidity
* @param {InlineObject7} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsHumidity: (v1sensorParam: InlineObject7, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Get temperature for requested sensors. This method returns the current ambient temperature (and probe temperature if applicable) for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get temperature
* @param {InlineObject8} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsTemperature: (v1sensorParam: InlineObject8, options?: RawAxiosRequestConfig) => Promise;
};
/**
* SensorsApi - functional programming interface
* @export
*/
export declare const SensorsApiFp: (configuration?: Configuration) => {
/**
* This endpoint is still on our legacy API. Get sensor objects. This method returns a list of the sensor objects in the Samsara Cloud and information about them. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get all sensors
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensors(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Get cargo monitor status (empty / full) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get cargo status
* @param {InlineObject4} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsCargo(v1sensorParam: InlineObject4, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Get door monitor status (closed / open) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get door status
* @param {InlineObject5} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsDoor(v1sensorParam: InlineObject5, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Get historical data for specified sensors. This method returns a set of historical data for the specified sensors in the specified time range and at the specified time resolution. Rate limit: 100 requests/sec (learn more about rate limits here). **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get sensor history
* @param {InlineObject6} historyParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsHistory(historyParam: InlineObject6, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Get humidity for requested sensors. This method returns the current relative humidity for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get humidity
* @param {InlineObject7} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsHumidity(v1sensorParam: InlineObject7, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Get temperature for requested sensors. This method returns the current ambient temperature (and probe temperature if applicable) for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get temperature
* @param {InlineObject8} v1sensorParam
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsTemperature(v1sensorParam: InlineObject8, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
};
/**
* SensorsApi - factory interface
* @export
*/
export declare const SensorsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* This endpoint is still on our legacy API. Get sensor objects. This method returns a list of the sensor objects in the Samsara Cloud and information about them. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get all sensors
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensors(options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Get cargo monitor status (empty / full) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get cargo status
* @param {SensorsApiV1getSensorsCargoRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsCargo(requestParameters: SensorsApiV1getSensorsCargoRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Get door monitor status (closed / open) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get door status
* @param {SensorsApiV1getSensorsDoorRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsDoor(requestParameters: SensorsApiV1getSensorsDoorRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Get historical data for specified sensors. This method returns a set of historical data for the specified sensors in the specified time range and at the specified time resolution. Rate limit: 100 requests/sec (learn more about rate limits here). **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get sensor history
* @param {SensorsApiV1getSensorsHistoryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsHistory(requestParameters: SensorsApiV1getSensorsHistoryRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Get humidity for requested sensors. This method returns the current relative humidity for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get humidity
* @param {SensorsApiV1getSensorsHumidityRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsHumidity(requestParameters: SensorsApiV1getSensorsHumidityRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Get temperature for requested sensors. This method returns the current ambient temperature (and probe temperature if applicable) for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get temperature
* @param {SensorsApiV1getSensorsTemperatureRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getSensorsTemperature(requestParameters: SensorsApiV1getSensorsTemperatureRequest, options?: RawAxiosRequestConfig): AxiosPromise;
};
/**
* Request parameters for v1getSensorsCargo operation in SensorsApi.
* @export
* @interface SensorsApiV1getSensorsCargoRequest
*/
export interface SensorsApiV1getSensorsCargoRequest {
/**
*
* @type {InlineObject4}
* @memberof SensorsApiV1getSensorsCargo
*/
readonly v1sensorParam: InlineObject4;
}
/**
* Request parameters for v1getSensorsDoor operation in SensorsApi.
* @export
* @interface SensorsApiV1getSensorsDoorRequest
*/
export interface SensorsApiV1getSensorsDoorRequest {
/**
*
* @type {InlineObject5}
* @memberof SensorsApiV1getSensorsDoor
*/
readonly v1sensorParam: InlineObject5;
}
/**
* Request parameters for v1getSensorsHistory operation in SensorsApi.
* @export
* @interface SensorsApiV1getSensorsHistoryRequest
*/
export interface SensorsApiV1getSensorsHistoryRequest {
/**
*
* @type {InlineObject6}
* @memberof SensorsApiV1getSensorsHistory
*/
readonly historyParam: InlineObject6;
}
/**
* Request parameters for v1getSensorsHumidity operation in SensorsApi.
* @export
* @interface SensorsApiV1getSensorsHumidityRequest
*/
export interface SensorsApiV1getSensorsHumidityRequest {
/**
*
* @type {InlineObject7}
* @memberof SensorsApiV1getSensorsHumidity
*/
readonly v1sensorParam: InlineObject7;
}
/**
* Request parameters for v1getSensorsTemperature operation in SensorsApi.
* @export
* @interface SensorsApiV1getSensorsTemperatureRequest
*/
export interface SensorsApiV1getSensorsTemperatureRequest {
/**
*
* @type {InlineObject8}
* @memberof SensorsApiV1getSensorsTemperature
*/
readonly v1sensorParam: InlineObject8;
}
/**
* SensorsApi - object-oriented interface
* @export
* @class SensorsApi
* @extends {BaseAPI}
*/
export declare class SensorsApi extends BaseAPI {
/**
* This endpoint is still on our legacy API. Get sensor objects. This method returns a list of the sensor objects in the Samsara Cloud and information about them. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get all sensors
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SensorsApi
*/
v1getSensors(options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Get cargo monitor status (empty / full) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get cargo status
* @param {SensorsApiV1getSensorsCargoRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SensorsApi
*/
v1getSensorsCargo(requestParameters: SensorsApiV1getSensorsCargoRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Get door monitor status (closed / open) for requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get door status
* @param {SensorsApiV1getSensorsDoorRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SensorsApi
*/
v1getSensorsDoor(requestParameters: SensorsApiV1getSensorsDoorRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Get historical data for specified sensors. This method returns a set of historical data for the specified sensors in the specified time range and at the specified time resolution. Rate limit: 100 requests/sec (learn more about rate limits here). **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get sensor history
* @param {SensorsApiV1getSensorsHistoryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SensorsApi
*/
v1getSensorsHistory(requestParameters: SensorsApiV1getSensorsHistoryRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Get humidity for requested sensors. This method returns the current relative humidity for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get humidity
* @param {SensorsApiV1getSensorsHumidityRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SensorsApi
*/
v1getSensorsHumidity(requestParameters: SensorsApiV1getSensorsHumidityRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Get temperature for requested sensors. This method returns the current ambient temperature (and probe temperature if applicable) for the requested sensors. **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team. To use this endpoint, select **Write Sensors** under the Equipment category when creating or editing an API token. Learn More.
* @summary Get temperature
* @param {SensorsApiV1getSensorsTemperatureRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SensorsApi
*/
v1getSensorsTemperature(requestParameters: SensorsApiV1getSensorsTemperatureRequest, options?: RawAxiosRequestConfig): Promise>;
}