/**
* 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 { SafetyEventsGetSafetyActivityEventFeedResponseBody } from '../samsara-models';
import { SafetyEventsListResponse } from '../samsara-models';
import { V1DriverSafetyScoreResponse } from '../samsara-models';
import { V1VehicleHarshEventResponse } from '../samsara-models';
import { V1VehicleSafetyScoreResponse } from '../samsara-models';
/**
* SafetyApi - axios parameter creator
* @export
*/
export declare const SafetyApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Get continuous safety events. The safety activity event feed offers a change-log for safety events. Use this endpoint to subscribe to safety event changes. See documentation below for all supported change-log types. | ActivityType | Description | | ----------- | ----------- | | CreateSafetyEventActivityType | a new safety event is processed by Samsara | | BehaviorLabelActivityType | a label is added or removed from a safety event | | CoachingStateActivityType | a safety event coaching state is updated | Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Safety Events & Scores** under the Safety & Cameras 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 Fetches safety activity event feed
* @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 {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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSafetyActivityEventFeed: (after?: string, startTime?: string, options?: RawAxiosRequestConfig) => Promise;
/**
* Fetch safety events for the organization in a given time period. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary List all safety events.
* @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 {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} [tagIds] A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @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} [vehicleIds] A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSafetyEvents: (startTime: string, endTime: string, after?: string, tagIds?: Array, parentTagIds?: Array, vehicleIds?: Array, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the driver. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch driver safety score
* @param {number} driverId ID of the driver. Must contain only digits 0-9.
* @param {number} startMs Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {number} endMs Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getDriverSafetyScore: (driverId: number, startMs: number, endMs: number, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Fetch harsh event details for a vehicle. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch harsh events
* @param {number} vehicleId ID of the vehicle. Must contain only digits 0-9.
* @param {number} timestamp Timestamp in milliseconds representing the timestamp of a harsh event.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getVehicleHarshEvent: (vehicleId: number, timestamp: number, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the vehicle. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch vehicle safety scores
* @param {number} vehicleId ID of the vehicle. Must contain only digits 0-9.
* @param {number} startMs Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {number} endMs Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getVehicleSafetyScore: (vehicleId: number, startMs: number, endMs: number, options?: RawAxiosRequestConfig) => Promise;
};
/**
* SafetyApi - functional programming interface
* @export
*/
export declare const SafetyApiFp: (configuration?: Configuration) => {
/**
* Get continuous safety events. The safety activity event feed offers a change-log for safety events. Use this endpoint to subscribe to safety event changes. See documentation below for all supported change-log types. | ActivityType | Description | | ----------- | ----------- | | CreateSafetyEventActivityType | a new safety event is processed by Samsara | | BehaviorLabelActivityType | a label is added or removed from a safety event | | CoachingStateActivityType | a safety event coaching state is updated | Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Safety Events & Scores** under the Safety & Cameras 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 Fetches safety activity event feed
* @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 {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 {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSafetyActivityEventFeed(after?: string, startTime?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Fetch safety events for the organization in a given time period. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary List all safety events.
* @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 {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} [tagIds] A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @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} [vehicleIds] A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSafetyEvents(startTime: string, endTime: string, after?: string, tagIds?: Array, parentTagIds?: Array, vehicleIds?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the driver. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch driver safety score
* @param {number} driverId ID of the driver. Must contain only digits 0-9.
* @param {number} startMs Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {number} endMs Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getDriverSafetyScore(driverId: number, startMs: number, endMs: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Fetch harsh event details for a vehicle. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch harsh events
* @param {number} vehicleId ID of the vehicle. Must contain only digits 0-9.
* @param {number} timestamp Timestamp in milliseconds representing the timestamp of a harsh event.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getVehicleHarshEvent(vehicleId: number, timestamp: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the vehicle. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch vehicle safety scores
* @param {number} vehicleId ID of the vehicle. Must contain only digits 0-9.
* @param {number} startMs Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {number} endMs Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getVehicleSafetyScore(vehicleId: number, startMs: number, endMs: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
};
/**
* SafetyApi - factory interface
* @export
*/
export declare const SafetyApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Get continuous safety events. The safety activity event feed offers a change-log for safety events. Use this endpoint to subscribe to safety event changes. See documentation below for all supported change-log types. | ActivityType | Description | | ----------- | ----------- | | CreateSafetyEventActivityType | a new safety event is processed by Samsara | | BehaviorLabelActivityType | a label is added or removed from a safety event | | CoachingStateActivityType | a safety event coaching state is updated | Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Safety Events & Scores** under the Safety & Cameras 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 Fetches safety activity event feed
* @param {SafetyApiGetSafetyActivityEventFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSafetyActivityEventFeed(requestParameters?: SafetyApiGetSafetyActivityEventFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Fetch safety events for the organization in a given time period. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary List all safety events.
* @param {SafetyApiGetSafetyEventsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSafetyEvents(requestParameters: SafetyApiGetSafetyEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the driver. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch driver safety score
* @param {SafetyApiV1getDriverSafetyScoreRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getDriverSafetyScore(requestParameters: SafetyApiV1getDriverSafetyScoreRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Fetch harsh event details for a vehicle. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch harsh events
* @param {SafetyApiV1getVehicleHarshEventRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getVehicleHarshEvent(requestParameters: SafetyApiV1getVehicleHarshEventRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the vehicle. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch vehicle safety scores
* @param {SafetyApiV1getVehicleSafetyScoreRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1getVehicleSafetyScore(requestParameters: SafetyApiV1getVehicleSafetyScoreRequest, options?: RawAxiosRequestConfig): AxiosPromise;
};
/**
* Request parameters for getSafetyActivityEventFeed operation in SafetyApi.
* @export
* @interface SafetyApiGetSafetyActivityEventFeedRequest
*/
export interface SafetyApiGetSafetyActivityEventFeedRequest {
/**
* 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 SafetyApiGetSafetyActivityEventFeed
*/
readonly after?: string;
/**
* 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 SafetyApiGetSafetyActivityEventFeed
*/
readonly startTime?: string;
}
/**
* Request parameters for getSafetyEvents operation in SafetyApi.
* @export
* @interface SafetyApiGetSafetyEventsRequest
*/
export interface SafetyApiGetSafetyEventsRequest {
/**
* 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 SafetyApiGetSafetyEvents
*/
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 SafetyApiGetSafetyEvents
*/
readonly endTime: 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 SafetyApiGetSafetyEvents
*/
readonly after?: string;
/**
* A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
* @type {Array}
* @memberof SafetyApiGetSafetyEvents
*/
readonly tagIds?: Array;
/**
* 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 SafetyApiGetSafetyEvents
*/
readonly parentTagIds?: Array;
/**
* A filter on the data based on this comma-separated list of vehicle IDs. Example: `vehicleIds=1234,5678`
* @type {Array}
* @memberof SafetyApiGetSafetyEvents
*/
readonly vehicleIds?: Array;
}
/**
* Request parameters for v1getDriverSafetyScore operation in SafetyApi.
* @export
* @interface SafetyApiV1getDriverSafetyScoreRequest
*/
export interface SafetyApiV1getDriverSafetyScoreRequest {
/**
* ID of the driver. Must contain only digits 0-9.
* @type {number}
* @memberof SafetyApiV1getDriverSafetyScore
*/
readonly driverId: number;
/**
* Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @type {number}
* @memberof SafetyApiV1getDriverSafetyScore
*/
readonly startMs: number;
/**
* Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @type {number}
* @memberof SafetyApiV1getDriverSafetyScore
*/
readonly endMs: number;
}
/**
* Request parameters for v1getVehicleHarshEvent operation in SafetyApi.
* @export
* @interface SafetyApiV1getVehicleHarshEventRequest
*/
export interface SafetyApiV1getVehicleHarshEventRequest {
/**
* ID of the vehicle. Must contain only digits 0-9.
* @type {number}
* @memberof SafetyApiV1getVehicleHarshEvent
*/
readonly vehicleId: number;
/**
* Timestamp in milliseconds representing the timestamp of a harsh event.
* @type {number}
* @memberof SafetyApiV1getVehicleHarshEvent
*/
readonly timestamp: number;
}
/**
* Request parameters for v1getVehicleSafetyScore operation in SafetyApi.
* @export
* @interface SafetyApiV1getVehicleSafetyScoreRequest
*/
export interface SafetyApiV1getVehicleSafetyScoreRequest {
/**
* ID of the vehicle. Must contain only digits 0-9.
* @type {number}
* @memberof SafetyApiV1getVehicleSafetyScore
*/
readonly vehicleId: number;
/**
* Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @type {number}
* @memberof SafetyApiV1getVehicleSafetyScore
*/
readonly startMs: number;
/**
* Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs. Total duration (endMs - startMs) must be greater than or equal to 1 hour.
* @type {number}
* @memberof SafetyApiV1getVehicleSafetyScore
*/
readonly endMs: number;
}
/**
* SafetyApi - object-oriented interface
* @export
* @class SafetyApi
* @extends {BaseAPI}
*/
export declare class SafetyApi extends BaseAPI {
/**
* Get continuous safety events. The safety activity event feed offers a change-log for safety events. Use this endpoint to subscribe to safety event changes. See documentation below for all supported change-log types. | ActivityType | Description | | ----------- | ----------- | | CreateSafetyEventActivityType | a new safety event is processed by Samsara | | BehaviorLabelActivityType | a label is added or removed from a safety event | | CoachingStateActivityType | a safety event coaching state is updated | Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read Safety Events & Scores** under the Safety & Cameras 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 Fetches safety activity event feed
* @param {SafetyApiGetSafetyActivityEventFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SafetyApi
*/
getSafetyActivityEventFeed(requestParameters?: SafetyApiGetSafetyActivityEventFeedRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Fetch safety events for the organization in a given time period. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary List all safety events.
* @param {SafetyApiGetSafetyEventsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SafetyApi
*/
getSafetyEvents(requestParameters: SafetyApiGetSafetyEventsRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the driver. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch driver safety score
* @param {SafetyApiV1getDriverSafetyScoreRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SafetyApi
*/
v1getDriverSafetyScore(requestParameters: SafetyApiV1getDriverSafetyScoreRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Fetch harsh event details for a vehicle. **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 Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch harsh events
* @param {SafetyApiV1getVehicleHarshEventRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SafetyApi
*/
v1getVehicleHarshEvent(requestParameters: SafetyApiV1getVehicleHarshEventRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Fetch the safety score for the vehicle. Rate limit: 5 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 **Read Safety Events & Scores** under the Safety & Cameras category when creating or editing an API token. Learn More.
* @summary Fetch vehicle safety scores
* @param {SafetyApiV1getVehicleSafetyScoreRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SafetyApi
*/
v1getVehicleSafetyScore(requestParameters: SafetyApiV1getVehicleSafetyScoreRequest, options?: RawAxiosRequestConfig): Promise>;
}