/**
* 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 { LocationAndSpeedGetLocationAndSpeedResponseBody } from '../samsara-models';
/**
* LocationAndSpeedApi - axios parameter creator
* @export
*/
export declare const LocationAndSpeedApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* This endpoint will return asset locations and speed data that has been collected for your organization based on the time parameters passed in. Results are paginated. If you include an endTime, the endpoint will return data up until that point. If you don’t include an endTime, you can continue to poll the API real-time with the pagination cursor that gets returned on every call. The endpoint will only return data up until the endTime that has been processed by the server at the time of the original request. You will need to request the same [startTime, endTime) range again to receive data for assets processed after the original request time. This endpoint sorts the time-series data by device. Rate limit: 10 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Vehicles** under the Vehicles category when creating or editing an API token. Learn More. **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.
* @summary List asset location and speed data in an organization.
* @param {string} [after] If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
* @param {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @param {string} [startTime] A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {string} [endTime] An end time in RFC 3339 format. Defaults to never if not provided; if not provided then pagination will not cease, and a valid pagination cursor will always be returned. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {Array} [ids] Comma-separated list of asset IDs.
* @param {boolean} [includeSpeed] Optional boolean indicating whether or not to return the \'speed\' object
* @param {boolean} [includeReverseGeo] Optional boolean indicating whether or not to return the \'address\' object
* @param {boolean} [includeGeofenceLookup] Optional boolean indicating whether or not to return the \'geofence\' object
* @param {boolean} [includeExternalIds] Optional boolean indicating whether to return external IDs on supported entities
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLocationAndSpeed: (after?: string, limit?: number, startTime?: string, endTime?: string, ids?: Array, includeSpeed?: boolean, includeReverseGeo?: boolean, includeGeofenceLookup?: boolean, includeExternalIds?: boolean, options?: RawAxiosRequestConfig) => Promise;
};
/**
* LocationAndSpeedApi - functional programming interface
* @export
*/
export declare const LocationAndSpeedApiFp: (configuration?: Configuration) => {
/**
* This endpoint will return asset locations and speed data that has been collected for your organization based on the time parameters passed in. Results are paginated. If you include an endTime, the endpoint will return data up until that point. If you don’t include an endTime, you can continue to poll the API real-time with the pagination cursor that gets returned on every call. The endpoint will only return data up until the endTime that has been processed by the server at the time of the original request. You will need to request the same [startTime, endTime) range again to receive data for assets processed after the original request time. This endpoint sorts the time-series data by device. Rate limit: 10 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Vehicles** under the Vehicles category when creating or editing an API token. Learn More. **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.
* @summary List asset location and speed data in an organization.
* @param {string} [after] If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
* @param {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @param {string} [startTime] A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {string} [endTime] An end time in RFC 3339 format. Defaults to never if not provided; if not provided then pagination will not cease, and a valid pagination cursor will always be returned. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {Array} [ids] Comma-separated list of asset IDs.
* @param {boolean} [includeSpeed] Optional boolean indicating whether or not to return the \'speed\' object
* @param {boolean} [includeReverseGeo] Optional boolean indicating whether or not to return the \'address\' object
* @param {boolean} [includeGeofenceLookup] Optional boolean indicating whether or not to return the \'geofence\' object
* @param {boolean} [includeExternalIds] Optional boolean indicating whether to return external IDs on supported entities
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLocationAndSpeed(after?: string, limit?: number, startTime?: string, endTime?: string, ids?: Array, includeSpeed?: boolean, includeReverseGeo?: boolean, includeGeofenceLookup?: boolean, includeExternalIds?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
};
/**
* LocationAndSpeedApi - factory interface
* @export
*/
export declare const LocationAndSpeedApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* This endpoint will return asset locations and speed data that has been collected for your organization based on the time parameters passed in. Results are paginated. If you include an endTime, the endpoint will return data up until that point. If you don’t include an endTime, you can continue to poll the API real-time with the pagination cursor that gets returned on every call. The endpoint will only return data up until the endTime that has been processed by the server at the time of the original request. You will need to request the same [startTime, endTime) range again to receive data for assets processed after the original request time. This endpoint sorts the time-series data by device. Rate limit: 10 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Vehicles** under the Vehicles category when creating or editing an API token. Learn More. **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.
* @summary List asset location and speed data in an organization.
* @param {LocationAndSpeedApiGetLocationAndSpeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLocationAndSpeed(requestParameters?: LocationAndSpeedApiGetLocationAndSpeedRequest, options?: RawAxiosRequestConfig): AxiosPromise;
};
/**
* Request parameters for getLocationAndSpeed operation in LocationAndSpeedApi.
* @export
* @interface LocationAndSpeedApiGetLocationAndSpeedRequest
*/
export interface LocationAndSpeedApiGetLocationAndSpeedRequest {
/**
* If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
* @type {string}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly after?: string;
/**
* The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @type {number}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly limit?: number;
/**
* A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @type {string}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly startTime?: string;
/**
* An end time in RFC 3339 format. Defaults to never if not provided; if not provided then pagination will not cease, and a valid pagination cursor will always be returned. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @type {string}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly endTime?: string;
/**
* Comma-separated list of asset IDs.
* @type {Array}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly ids?: Array;
/**
* Optional boolean indicating whether or not to return the \'speed\' object
* @type {boolean}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly includeSpeed?: boolean;
/**
* Optional boolean indicating whether or not to return the \'address\' object
* @type {boolean}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly includeReverseGeo?: boolean;
/**
* Optional boolean indicating whether or not to return the \'geofence\' object
* @type {boolean}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly includeGeofenceLookup?: boolean;
/**
* Optional boolean indicating whether to return external IDs on supported entities
* @type {boolean}
* @memberof LocationAndSpeedApiGetLocationAndSpeed
*/
readonly includeExternalIds?: boolean;
}
/**
* LocationAndSpeedApi - object-oriented interface
* @export
* @class LocationAndSpeedApi
* @extends {BaseAPI}
*/
export declare class LocationAndSpeedApi extends BaseAPI {
/**
* This endpoint will return asset locations and speed data that has been collected for your organization based on the time parameters passed in. Results are paginated. If you include an endTime, the endpoint will return data up until that point. If you don’t include an endTime, you can continue to poll the API real-time with the pagination cursor that gets returned on every call. The endpoint will only return data up until the endTime that has been processed by the server at the time of the original request. You will need to request the same [startTime, endTime) range again to receive data for assets processed after the original request time. This endpoint sorts the time-series data by device. Rate limit: 10 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Vehicles** under the Vehicles category when creating or editing an API token. Learn More. **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.
* @summary List asset location and speed data in an organization.
* @param {LocationAndSpeedApiGetLocationAndSpeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LocationAndSpeedApi
*/
getLocationAndSpeed(requestParameters?: LocationAndSpeedApiGetLocationAndSpeedRequest, options?: RawAxiosRequestConfig): Promise>;
}