/**
* 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 { DefectsResponse } from '../samsara-models';
import { DriversVehicleAssignmentsGetDriversVehicleAssignmentsResponseBody } from '../samsara-models';
import { DvirsListResponse } from '../samsara-models';
import { VehiclesDriverAssignmentsGetVehiclesDriverAssignmentsResponseBody } from '../samsara-models';
/**
* LegacyAPIsApi - axios parameter creator
* @export
*/
export declare const LegacyAPIsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all vehicle assignments for the requested drivers in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all vehicles assigned to a set of drivers
* @param {Array} [driverIds] A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
* @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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [endTime] An end 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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [tagIds] A filter on the data based on this comma-separated list of driver tag IDs. Example: `tagIds=1234,5678`
* @param {string} [parentTagIds] A filter on the data based on this comma-separated list of driver parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @param {GetDriversVehicleAssignmentsDriverActivationStatusEnum} [driverActivationStatus] If value is `deactivated`, only drivers that are deactivated will appear in the response. This parameter will default to `active` if not provided (fetching only active drivers). Valid values: `active`, `deactivated`
* @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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDriversVehicleAssignments: (driverIds?: Array, startTime?: string, endTime?: string, tagIds?: string, parentTagIds?: string, driverActivationStatus?: GetDriversVehicleAssignmentsDriverActivationStatusEnum, after?: string, options?: RawAxiosRequestConfig) => Promise;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/streamdefects) instead. The endpoint will continue to function as documented.** Returns a list of DVIR defects in an organization, filtered by creation time. The maximum time period you can query for is 30 days. **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 **Read Defects** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all defects
* @param {string} startTime A start time in RFC 3339 format. 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). *The maximum time period you can query for is 30 days.*
* @param {string} endTime An end time in RFC 3339 format. 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). *The maximum time period you can query for is 30 days.*
* @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} [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 {boolean} [isResolved] A filter on the data based on resolution status. Example: `isResolved=true`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDvirDefects: (startTime: string, endTime: string, limit?: number, after?: string, isResolved?: boolean, options?: RawAxiosRequestConfig) => Promise;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdvirs) instead. The endpoint will continue to function as documented.** Returns a list of all DVIRs in an organization. **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 **Read DVIRs** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all DVIRs
* @param {string} startTime A start time in RFC 3339 format. 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. 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 {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @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 {Array} [parentTagIds] A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @param {Array} [tagIds] A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDvirHistory: (startTime: string, endTime: string, limit?: number, after?: string, parentTagIds?: Array, tagIds?: Array, options?: RawAxiosRequestConfig) => Promise;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all driver assignments for the requested vehicles in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all drivers assigned to a set of vehicles
* @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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [endTime] An end 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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [vehicleIds] A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
* @param {string} [tagIds] A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @param {string} [parentTagIds] A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
getVehiclesDriverAssignments: (startTime?: string, endTime?: string, vehicleIds?: string, tagIds?: string, parentTagIds?: string, after?: string, options?: RawAxiosRequestConfig) => Promise;
};
/**
* LegacyAPIsApi - functional programming interface
* @export
*/
export declare const LegacyAPIsApiFp: (configuration?: Configuration) => {
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all vehicle assignments for the requested drivers in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all vehicles assigned to a set of drivers
* @param {Array} [driverIds] A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
* @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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [endTime] An end 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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [tagIds] A filter on the data based on this comma-separated list of driver tag IDs. Example: `tagIds=1234,5678`
* @param {string} [parentTagIds] A filter on the data based on this comma-separated list of driver parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @param {GetDriversVehicleAssignmentsDriverActivationStatusEnum} [driverActivationStatus] If value is `deactivated`, only drivers that are deactivated will appear in the response. This parameter will default to `active` if not provided (fetching only active drivers). Valid values: `active`, `deactivated`
* @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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDriversVehicleAssignments(driverIds?: Array, startTime?: string, endTime?: string, tagIds?: string, parentTagIds?: string, driverActivationStatus?: GetDriversVehicleAssignmentsDriverActivationStatusEnum, after?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/streamdefects) instead. The endpoint will continue to function as documented.** Returns a list of DVIR defects in an organization, filtered by creation time. The maximum time period you can query for is 30 days. **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 **Read Defects** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all defects
* @param {string} startTime A start time in RFC 3339 format. 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). *The maximum time period you can query for is 30 days.*
* @param {string} endTime An end time in RFC 3339 format. 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). *The maximum time period you can query for is 30 days.*
* @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} [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 {boolean} [isResolved] A filter on the data based on resolution status. Example: `isResolved=true`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDvirDefects(startTime: string, endTime: string, limit?: number, after?: string, isResolved?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdvirs) instead. The endpoint will continue to function as documented.** Returns a list of all DVIRs in an organization. **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 **Read DVIRs** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all DVIRs
* @param {string} startTime A start time in RFC 3339 format. 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. 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 {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @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 {Array} [parentTagIds] A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @param {Array} [tagIds] A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDvirHistory(startTime: string, endTime: string, limit?: number, after?: string, parentTagIds?: Array, tagIds?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all driver assignments for the requested vehicles in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all drivers assigned to a set of vehicles
* @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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [endTime] An end 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). The maximum allowed startTime-endTime range is 7 days.
* @param {string} [vehicleIds] A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
* @param {string} [tagIds] A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @param {string} [parentTagIds] A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
getVehiclesDriverAssignments(startTime?: string, endTime?: string, vehicleIds?: string, tagIds?: string, parentTagIds?: string, after?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
};
/**
* LegacyAPIsApi - factory interface
* @export
*/
export declare const LegacyAPIsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all vehicle assignments for the requested drivers in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all vehicles assigned to a set of drivers
* @param {LegacyAPIsApiGetDriversVehicleAssignmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDriversVehicleAssignments(requestParameters?: LegacyAPIsApiGetDriversVehicleAssignmentsRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/streamdefects) instead. The endpoint will continue to function as documented.** Returns a list of DVIR defects in an organization, filtered by creation time. The maximum time period you can query for is 30 days. **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 **Read Defects** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all defects
* @param {LegacyAPIsApiGetDvirDefectsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDvirDefects(requestParameters: LegacyAPIsApiGetDvirDefectsRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdvirs) instead. The endpoint will continue to function as documented.** Returns a list of all DVIRs in an organization. **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 **Read DVIRs** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all DVIRs
* @param {LegacyAPIsApiGetDvirHistoryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDvirHistory(requestParameters: LegacyAPIsApiGetDvirHistoryRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all driver assignments for the requested vehicles in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all drivers assigned to a set of vehicles
* @param {LegacyAPIsApiGetVehiclesDriverAssignmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getVehiclesDriverAssignments(requestParameters?: LegacyAPIsApiGetVehiclesDriverAssignmentsRequest, options?: RawAxiosRequestConfig): AxiosPromise;
};
/**
* Request parameters for getDriversVehicleAssignments operation in LegacyAPIsApi.
* @export
* @interface LegacyAPIsApiGetDriversVehicleAssignmentsRequest
*/
export interface LegacyAPIsApiGetDriversVehicleAssignmentsRequest {
/**
* A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
* @type {Array}
* @memberof LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly driverIds?: Array;
/**
* 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). The maximum allowed startTime-endTime range is 7 days.
* @type {string}
* @memberof LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly startTime?: string;
/**
* An end 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). The maximum allowed startTime-endTime range is 7 days.
* @type {string}
* @memberof LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly endTime?: string;
/**
* A filter on the data based on this comma-separated list of driver tag IDs. Example: `tagIds=1234,5678`
* @type {string}
* @memberof LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly tagIds?: string;
/**
* A filter on the data based on this comma-separated list of driver parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @type {string}
* @memberof LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly parentTagIds?: string;
/**
* If value is `deactivated`, only drivers that are deactivated will appear in the response. This parameter will default to `active` if not provided (fetching only active drivers). Valid values: `active`, `deactivated`
* @type {'active' | 'deactivated'}
* @memberof LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly driverActivationStatus?: GetDriversVehicleAssignmentsDriverActivationStatusEnum;
/**
* 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 LegacyAPIsApiGetDriversVehicleAssignments
*/
readonly after?: string;
}
/**
* Request parameters for getDvirDefects operation in LegacyAPIsApi.
* @export
* @interface LegacyAPIsApiGetDvirDefectsRequest
*/
export interface LegacyAPIsApiGetDvirDefectsRequest {
/**
* A start time in RFC 3339 format. 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). *The maximum time period you can query for is 30 days.*
* @type {string}
* @memberof LegacyAPIsApiGetDvirDefects
*/
readonly startTime: string;
/**
* An end time in RFC 3339 format. 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). *The maximum time period you can query for is 30 days.*
* @type {string}
* @memberof LegacyAPIsApiGetDvirDefects
*/
readonly endTime: string;
/**
* The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @type {number}
* @memberof LegacyAPIsApiGetDvirDefects
*/
readonly limit?: number;
/**
* 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 LegacyAPIsApiGetDvirDefects
*/
readonly after?: string;
/**
* A filter on the data based on resolution status. Example: `isResolved=true`
* @type {boolean}
* @memberof LegacyAPIsApiGetDvirDefects
*/
readonly isResolved?: boolean;
}
/**
* Request parameters for getDvirHistory operation in LegacyAPIsApi.
* @export
* @interface LegacyAPIsApiGetDvirHistoryRequest
*/
export interface LegacyAPIsApiGetDvirHistoryRequest {
/**
* A start time in RFC 3339 format. 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 LegacyAPIsApiGetDvirHistory
*/
readonly startTime: string;
/**
* An end time in RFC 3339 format. 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 LegacyAPIsApiGetDvirHistory
*/
readonly endTime: string;
/**
* The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @type {number}
* @memberof LegacyAPIsApiGetDvirHistory
*/
readonly limit?: number;
/**
* 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 LegacyAPIsApiGetDvirHistory
*/
readonly after?: string;
/**
* A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @type {Array}
* @memberof LegacyAPIsApiGetDvirHistory
*/
readonly parentTagIds?: Array;
/**
* A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @type {Array}
* @memberof LegacyAPIsApiGetDvirHistory
*/
readonly tagIds?: Array;
}
/**
* Request parameters for getVehiclesDriverAssignments operation in LegacyAPIsApi.
* @export
* @interface LegacyAPIsApiGetVehiclesDriverAssignmentsRequest
*/
export interface LegacyAPIsApiGetVehiclesDriverAssignmentsRequest {
/**
* 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). The maximum allowed startTime-endTime range is 7 days.
* @type {string}
* @memberof LegacyAPIsApiGetVehiclesDriverAssignments
*/
readonly startTime?: string;
/**
* An end 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). The maximum allowed startTime-endTime range is 7 days.
* @type {string}
* @memberof LegacyAPIsApiGetVehiclesDriverAssignments
*/
readonly endTime?: string;
/**
* A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
* @type {string}
* @memberof LegacyAPIsApiGetVehiclesDriverAssignments
*/
readonly vehicleIds?: string;
/**
* A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @type {string}
* @memberof LegacyAPIsApiGetVehiclesDriverAssignments
*/
readonly tagIds?: string;
/**
* A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
* @type {string}
* @memberof LegacyAPIsApiGetVehiclesDriverAssignments
*/
readonly parentTagIds?: string;
/**
* 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 LegacyAPIsApiGetVehiclesDriverAssignments
*/
readonly after?: string;
}
/**
* LegacyAPIsApi - object-oriented interface
* @export
* @class LegacyAPIsApi
* @extends {BaseAPI}
*/
export declare class LegacyAPIsApi extends BaseAPI {
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all vehicle assignments for the requested drivers in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all vehicles assigned to a set of drivers
* @param {LegacyAPIsApiGetDriversVehicleAssignmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LegacyAPIsApi
*/
getDriversVehicleAssignments(requestParameters?: LegacyAPIsApiGetDriversVehicleAssignmentsRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/streamdefects) instead. The endpoint will continue to function as documented.** Returns a list of DVIR defects in an organization, filtered by creation time. The maximum time period you can query for is 30 days. **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 **Read Defects** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all defects
* @param {LegacyAPIsApiGetDvirDefectsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LegacyAPIsApi
*/
getDvirDefects(requestParameters: LegacyAPIsApiGetDvirDefectsRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdvirs) instead. The endpoint will continue to function as documented.** Returns a list of all DVIRs in an organization. **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 **Read DVIRs** under the Maintenance category when creating or editing an API token. Learn More.
* @summary [legacy] Get all DVIRs
* @param {LegacyAPIsApiGetDvirHistoryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LegacyAPIsApi
*/
getDvirHistory(requestParameters: LegacyAPIsApiGetDvirHistoryRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* **Note: This is a legacy endpoint, consider using [this endpoint](https://developers.samsara.com/reference/getdrivervehicleassignments) instead. The endpoint will continue to function as documented.** Get all driver assignments for the requested vehicles in the requested time range. The only type of assignment supported right now are assignments created through the driver app. Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Assignments** under the Assignments 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 [legacy] Get all drivers assigned to a set of vehicles
* @param {LegacyAPIsApiGetVehiclesDriverAssignmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LegacyAPIsApi
*/
getVehiclesDriverAssignments(requestParameters?: LegacyAPIsApiGetVehiclesDriverAssignmentsRequest, options?: RawAxiosRequestConfig): Promise>;
}
/**
* @export
*/
export declare const GetDriversVehicleAssignmentsDriverActivationStatusEnum: {
readonly Active: "active";
readonly Deactivated: "deactivated";
};
export type GetDriversVehicleAssignmentsDriverActivationStatusEnum = typeof GetDriversVehicleAssignmentsDriverActivationStatusEnum[keyof typeof GetDriversVehicleAssignmentsDriverActivationStatusEnum];