/** * 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 { FormsSelectOptionObjectResponseBody } from './forms-select-option-object-response-body'; /** * Forms field definition object. * @export * @interface FormsFieldDefinitionObjectResponseBody */ export interface FormsFieldDefinitionObjectResponseBody { /** * Indicates whether the field allows manual entry of a person. Only present for person fields. * @type {boolean} * @memberof FormsFieldDefinitionObjectResponseBody */ 'allowManualEntry'?: boolean; /** * List of allowed asset types that can be selected for this field. Only present for asset fields. * @type {Array} * @memberof FormsFieldDefinitionObjectResponseBody */ 'allowedAssetTypes'?: Array; /** * Type of date/time entry allowed for this question. Only present for datetime fields. Valid values: `datetime`, `date`, `time` * @type {string} * @memberof FormsFieldDefinitionObjectResponseBody */ 'allowedDateTimeValueType'?: FormsFieldDefinitionObjectResponseBodyAllowedDateTimeValueTypeEnum; /** * Indicates whether the person search filters by the current logged in worker\'s tags. Only present for person fields. * @type {boolean} * @memberof FormsFieldDefinitionObjectResponseBody */ 'filterByCurrentDriverTags'?: boolean; /** * List of role IDs to filter org users by, representing which roles are selectable people for this field. Only present for person fields. * @type {Array} * @memberof FormsFieldDefinitionObjectResponseBody */ 'filterByRoleIds'?: Array; /** * Identifier of the field. * @type {string} * @memberof FormsFieldDefinitionObjectResponseBody */ 'id': string; /** * Indicates whether the field includes drivers as selectable people. Only present for person fields. * @type {boolean} * @memberof FormsFieldDefinitionObjectResponseBody */ 'includeDrivers'?: boolean; /** * Indicates whether the field includes users as selectable people. Only present for person fields. * @type {boolean} * @memberof FormsFieldDefinitionObjectResponseBody */ 'includeUsers'?: boolean; /** * Indicates whether the form field is required to be filled out by the user. * @type {boolean} * @memberof FormsFieldDefinitionObjectResponseBody */ 'isRequired': boolean; /** * Label of the field. * @type {string} * @memberof FormsFieldDefinitionObjectResponseBody */ 'label': string; /** * Legal text for the field. Only present for signature fields. * @type {string} * @memberof FormsFieldDefinitionObjectResponseBody */ 'legalText'?: string; /** * Number of decimal places allowed. Only present for number fields. * @type {number} * @memberof FormsFieldDefinitionObjectResponseBody */ 'numDecimalPlaces'?: number; /** * List of select options for checkboxes or multiple choice fields. * @type {Array} * @memberof FormsFieldDefinitionObjectResponseBody */ 'options'?: Array; /** * The maximum possible score weight for this field. For multiple choice fields, this number is the highest option score weight of the given options. For checkboxes fields, this number is the sum of the score weights for all scored options. Only present for multiple choice or checkboxes fields that have scoring. * @type {number} * @memberof FormsFieldDefinitionObjectResponseBody */ 'questionWeight'?: number; /** * Type of the field. Valid values: `number`, `text`, `multiple_choice`, `check_boxes`, `media`, `datetime`, `signature`, `asset`, `person`, `geofence`, `instruction`, `media_instruction` * @type {string} * @memberof FormsFieldDefinitionObjectResponseBody */ 'type': FormsFieldDefinitionObjectResponseBodyTypeEnum; } export declare const FormsFieldDefinitionObjectResponseBodyAllowedAssetTypesEnum: { readonly Vehicle: "Vehicle"; readonly Trailer: "Trailer"; readonly Equipment: "Equipment"; readonly UnpoweredAsset: "UnpoweredAsset"; }; export type FormsFieldDefinitionObjectResponseBodyAllowedAssetTypesEnum = typeof FormsFieldDefinitionObjectResponseBodyAllowedAssetTypesEnum[keyof typeof FormsFieldDefinitionObjectResponseBodyAllowedAssetTypesEnum]; export declare const FormsFieldDefinitionObjectResponseBodyAllowedDateTimeValueTypeEnum: { readonly Datetime: "datetime"; readonly Date: "date"; readonly Time: "time"; }; export type FormsFieldDefinitionObjectResponseBodyAllowedDateTimeValueTypeEnum = typeof FormsFieldDefinitionObjectResponseBodyAllowedDateTimeValueTypeEnum[keyof typeof FormsFieldDefinitionObjectResponseBodyAllowedDateTimeValueTypeEnum]; export declare const FormsFieldDefinitionObjectResponseBodyTypeEnum: { readonly Number: "number"; readonly Text: "text"; readonly MultipleChoice: "multiple_choice"; readonly CheckBoxes: "check_boxes"; readonly Media: "media"; readonly Datetime: "datetime"; readonly Signature: "signature"; readonly Asset: "asset"; readonly Person: "person"; readonly Geofence: "geofence"; readonly Instruction: "instruction"; readonly MediaInstruction: "media_instruction"; }; export type FormsFieldDefinitionObjectResponseBodyTypeEnum = typeof FormsFieldDefinitionObjectResponseBodyTypeEnum[keyof typeof FormsFieldDefinitionObjectResponseBodyTypeEnum];