openapi: 3.0.0 servers: - description: Local Simulation Environment url: http://localhost:8086 - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/KnowGo/knowgo-vehicle-simulator-api/1.2.0 info: description: | This is a simple API for interacting with the KnowGo Vehicle Simulator. It provides mechanisms for starting/stopping the simulated vehicle, sending notifications to the vehicle, registering webhooks, and for obtaining detailed information and generated telemetry from the vehicle. It further offers the ability to submit external events in order to allow the vehicle simulation state to be synchronized with external vehicle data, allowing the simulated vehicle to act as a digital twin upon which additional applications and services can be modelled. Fine-grained access to vehicle data is provided through ISO 20078 Extended Vehicle (ExVe)-compatible API endpoints. version: 1.2.0 title: KnowGo Vehicle Simulator API contact: email: labs@adaptant.io license: name: Apache 2.0 url: 'http://www.apache.org/licenses/LICENSE-2.0.html' security: - bearerAuth: [] tags: - name: simulator description: Vehicle Simulator APIs - name: exve description: ISO 20078 Extended Vehicle (ExVe) APIs - name: fleet description: Fleet APIs paths: '/simulator/start': post: tags: - simulator summary: start the simulated vehicle operationId: vehicleStart description: Starts the running of the vehicle within the simulator responses: '200': description: OK '401': $ref: '#/components/responses/UnauthorizedError' '/simulator/stop': post: tags: - simulator summary: stop the simulated vehicle operationId: vehicleStop description: Stops the running of the vehicle within the simulator responses: '200': description: OK '401': $ref: '#/components/responses/UnauthorizedError' '/simulator/notification': post: tags: - simulator summary: send a notification to the simulated vehicle operationId: vehicleNotify description: Sends a notification to the simulated vehicle requestBody: description: Notification text to display required: true content: application/json: schema: $ref: '#/components/schemas/models.VehicleNotification' responses: '200': description: OK '401': $ref: '#/components/responses/UnauthorizedError' '/simulator/info': get: tags: - simulator summary: information about the simulated vehicle operationId: getVehicleInfo description: Obtain detailed information about the simulated vehicle. responses: '200': description: vehicle details content: application/json: schema: $ref: '#/components/schemas/models.VehicleDetail' '401': $ref: '#/components/responses/UnauthorizedError' '/simulator/events': get: tags: - simulator summary: get simulated vehicle events operationId: getVehicleEvents description: | Obtain detailed events from the simulated vehicle in its running state. responses: '200': description: vehicle events content: application/json: schema: type: array items: $ref: '#/components/schemas/models.VehicleEvent' '401': $ref: '#/components/responses/UnauthorizedError' post: tags: - simulator summary: apply events to the simulated vehicle operationId: addVehicleEvents description: | Submit a list of vehicle events to apply to the simulated vehicle. This can be used for digital twinning, where the simulation model state can be synchronized with external data sources. requestBody: description: Vehicle events to apply to the simulated vehicle content: application/json: schema: type: array items: $ref: '#/components/schemas/models.VehicleEvent' responses: '201': description: Events successfully added '401': $ref: '#/components/responses/UnauthorizedError' '/simulator/webhooks': get: tags: - simulator summary: get a list of available event triggers operationId: getAvailableEventTriggers responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/webhooks' '401': $ref: '#/components/responses/UnauthorizedError' post: tags: - simulator summary: register a new event-triggered webhook operationId: registerWebhook requestBody: required: true content: application/json: schema: type: object required: - webhooks - notificationUrl properties: webhooks: $ref: '#/components/schemas/webhooks' notificationUrl: type: string format: uri example: https://myserver/endpoint callbacks: automation_level_changed: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - automation_level_changed properties: automation_level_changed: $ref: '#/components/schemas/webhooks.AutomationLevelChange' responses: '200': description: Notification accepted driver_changed: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - driver_changed properties: driver_changed: $ref: '#/components/schemas/webhooks.DriverChange' responses: '200': description: Notification accepted journey_begin: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - journey_begin properties: journey_begin: $ref: '#/components/schemas/webhooks.JourneyChange' responses: '200': description: Notification accepted journey_end: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - journey_end properties: journey_end: $ref: '#/components/schemas/webhooks.JourneyChange' responses: '200': description: Notification accepted location_changed: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - location_changed properties: location_changed: $ref: '#/components/schemas/webhooks.LocationChange' responses: '200': description: Notification accepted ignition_changed: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - ignition_changed properties: ignition_changed: $ref: '#/components/schemas/webhooks.IgnitionChange' responses: '200': description: Notification accepted harsh_acceleration: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - harsh_acceleration properties: harsh_acceleration: $ref: '#/components/schemas/webhooks.HarshPedalEvent' responses: '200': description: Notification accepted harsh_braking: '{$request.body#/notificationUrl}': post: requestBody: required: true content: application/json: schema: type: object required: - harsh_braking properties: harsh_braking: $ref: '#/components/schemas/webhooks.HarshPedalEvent' responses: '200': description: Notification accepted responses: '201': description: Webhook registered content: application/json: schema: $ref: '#/components/schemas/webhooks.Subscription' '401': $ref: '#/components/responses/UnauthorizedError' '/simulator/webhooks/{subscriptionId}': get: tags: - simulator summary: get information about a registered webhook operationId: getWebhookById parameters: - in: path name: subscriptionId schema: type: string required: true description: Subscription ID of the webhook to get responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/webhooks' '401': $ref: '#/components/responses/UnauthorizedError' put: tags: - simulator summary: update a registered webhook operationId: updateWebhookById parameters: - in: path name: subscriptionId schema: type: string required: true description: Subscription ID of the webhook to update requestBody: required: true content: application/json: schema: type: object required: - webhooks - notificationUrl properties: webhooks: $ref: '#/components/schemas/webhooks' notificationUrl: type: string format: uri example: https://myserver/endpoint responses: '200': description: Webhook updated '401': $ref: '#/components/responses/UnauthorizedError' '404': description: Webhook subscription not found delete: tags: - simulator summary: unregister a webhook operationId: unregisterWebhook parameters: - in: path name: subscriptionId schema: type: string required: true description: Subscription ID of the webhook to unregister responses: '200': description: Webhook unregistered '401': $ref: '#/components/responses/UnauthorizedError' '/exve/fleets': get: tags: - fleet summary: get list of fleets available operationId: getFleets description: Obtain a list of fleets available to the accessing party responses: '200': description: list of available fleets content: application/json: schema: type: array items: $ref: '#/components/schemas/types.FleetID' '401': $ref: '#/components/responses/UnauthorizedError' post: tags: - fleet summary: create a new vehicle fleet operationId: createFleet description: Organize a number of vehicles into a fleet requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/types.VehicleID' responses: '201': description: Fleet successfully created content: application/json: schema: $ref: '#/components/schemas/types.FleetID' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/fleets/{fleetId}': get: tags: - fleet summary: get information about a specific vehicle fleet parameters: - in: path name: fleetId schema: type: integer required: true description: Numeric ID of the vehicle fleet to get operationId: getFleetInfoById description: Obtain detailed information about a specific vehicle fleet responses: '200': description: fleet details content: application/json: schema: $ref: '#/components/schemas/models.FleetDetail' '401': $ref: '#/components/responses/UnauthorizedError' post: tags: - fleet summary: add vehicles to an existing fleet parameters: - in: path name: fleetId schema: type: integer required: true description: Numeric ID of the vehicle fleet to update operationId: addVehiclesToFleet description: Add one or more vehicles to an existing fleet requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/types.VehicleID' responses: '200': description: Vehicles successfully added to fleet '401': $ref: '#/components/responses/UnauthorizedError' delete: tags: - fleet summary: delete a vehicle fleet parameters: - in: path name: fleetId schema: type: integer required: true description: Numeric ID of the vehicle fleet operationId: deleteFleet description: Remove a vehicle fleet responses: '200': description: Fleet successfully deleted '401': $ref: '#/components/responses/UnauthorizedError' '/exve/fleets/{fleetId}/vehicles': get: tags: - fleet summary: get list of vehicles contained in the fleet parameters: - in: path name: fleetId schema: type: integer required: true description: Numeric ID of the vehicle fleet operationId: listFleetVehicles description: Obtain a list of vehicles contained within the fleet responses: '200': description: fleet vehicles content: application/json: schema: type: array items: $ref: '#/components/schemas/types.VehicleID' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/fleets/{fleetId}/vehicles/{vehicleId}': get: tags: - fleet summary: get information about a specific vehicle within a fleet parameters: - in: path name: fleetId schema: type: integer required: true description: Numeric ID of the fleet the vehicle belongs to - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getFleetVehicleInfoById description: Obtain detailed information about a specific vehicle within a fleet responses: '200': description: vehicle details content: application/json: schema: $ref: '#/components/schemas/models.VehicleDetail' '401': $ref: '#/components/responses/UnauthorizedError' '404': description: Vehicle not found in fleet delete: tags: - fleet summary: remove a specific vehicle from a fleet parameters: - in: path name: fleetId schema: type: integer required: true description: Numeric ID of the fleet the vehicle belongs to - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to remove operationId: removeVehicleFromFleet description: Remove a specific vehicle from a fleet responses: '200': description: Vehicle successfully removed from fleet '401': $ref: '#/components/responses/UnauthorizedError' '404': description: Vehicle not found in fleet '/exve/vehicles': get: tags: - exve summary: get list of vehicles available operationId: getVehicles description: Obtain a list of vehicles available to the accessing party responses: '200': description: list of available vehicles content: application/json: schema: type: array items: $ref: '#/components/schemas/types.VehicleID' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}': get: tags: - exve summary: get information about a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getVehicleInfoById description: Obtain detailed information about a specific vehicle responses: '200': description: vehicle details content: application/json: schema: $ref: '#/components/schemas/models.VehicleDetail' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/capabilities': get: tags: - exve summary: get the capabilities of a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getVehicleCapabilitiesById description: | Obtain a list of capabilities of a specific vehicle responses: '200': description: vehicle capabilities content: application/json: schema: $ref: '#/components/schemas/exve.resources' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/resources': get: tags: - exve summary: get the available resources a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getVehicleResourcesById description: | Obtain a list of available resources for a specific vehicle responses: '200': description: available resources content: application/json: schema: $ref: '#/components/schemas/exve.resources' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/notification': post: tags: - exve summary: send a notification to a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle operationId: vehicleNotifyById description: Sends a notification to a specific vehicle requestBody: description: Notification text to display required: true content: application/json: schema: $ref: '#/components/schemas/models.VehicleNotification' responses: '200': description: OK '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/acceleratorPedalPositions': get: tags: - exve summary: get the accelerator pedal positions for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getAcceleratorPedalPositionsById description: | Obtain a list of changes in accelerator pedal positions for a specific vehicle. responses: '200': description: accelerator pedal positions content: application/json: schema: $ref: '#/components/schemas/exve.resources.AcceleratorPedalPositions' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/automationLevels': get: tags: - exve summary: get the automation levels for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getAutomationLevelsById description: | Obtain a list of changes in SAE J3016 automation levels for a specific vehicle. responses: '200': description: automation levels content: application/json: schema: $ref: '#/components/schemas/exve.resources.AutomationLevels' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/brakePedalPositions': get: tags: - exve summary: get the brake pedal positions for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getBrakePedalPositionsById description: | Obtain a list of changes in brake pedal positions for a specific vehicle. responses: '200': description: brake pedal positions content: application/json: schema: $ref: '#/components/schemas/exve.resources.BrakePedalPositions' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/doorStatuses': get: tags: - exve summary: get the changes in door status for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getDoorStatusesById description: | Obtain a list of changes in door status for a specific vehicle. responses: '200': description: door statuses content: application/json: schema: $ref: '#/components/schemas/exve.resources.DoorStatuses' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/fuelLevels': get: tags: - exve summary: get the changes in fuel levels for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getFuelLevelsById description: | Obtain a list of changes in fuel levels for a specific vehicle. responses: '200': description: fuel levels content: application/json: schema: $ref: '#/components/schemas/exve.resources.FuelLevels' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/headlampStatuses': get: tags: - exve summary: get the changes in headlamp status for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getHeadlampStatusesById description: | Obtain a list of changes in headlamp status for a specific vehicle. responses: '200': description: headlamp statuses content: application/json: schema: $ref: '#/components/schemas/exve.resources.HeadlampStatuses' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/highBeamStatuses': get: tags: - exve summary: get the changes in high beam status for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getHighBeamStatusesById description: | Obtain a list of changes in high beam status for a specific vehicle. responses: '200': description: high beam statuses content: application/json: schema: $ref: '#/components/schemas/exve.resources.HighBeamStatuses' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/ignitionStatuses': get: tags: - exve summary: get the changes in ignition status for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getIgnitionStatusesById description: | Obtain a list of changes in ignition status for a specific vehicle. responses: '200': description: ignition statuses content: application/json: schema: $ref: '#/components/schemas/exve.resources.IgnitionStatuses' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/locations': get: tags: - exve summary: get the locations for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getLocationsById description: | Obtain a list of changes in geolocation for a specific vehicle. responses: '200': description: vehicle locations content: application/json: schema: $ref: '#/components/schemas/exve.resources.Locations' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/odometers': get: tags: - exve summary: get the odometer values for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getOdometersById description: | Obtain a list of changes in odometer readings for a specific vehicle. responses: '200': description: odometer readings content: application/json: schema: $ref: '#/components/schemas/exve.resources.Odometers' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/parkingBrakeStatuses': get: tags: - exve summary: get the changes in parking brake status for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getParkingBrakeStatusesById description: | Obtain a list of changes in parking brake status for a specific vehicle. responses: '200': description: parking brake statuses content: application/json: schema: $ref: '#/components/schemas/exve.resources.ParkingBrakeStatuses' '401': $ref: '#/components/responses/UnauthorizedError' '/exve/vehicles/{vehicleId}/windshieldWiperStatuses': get: tags: - exve summary: get the changes in windshield wiper status for a specific vehicle parameters: - in: path name: vehicleId schema: type: integer required: true description: Numeric ID of the vehicle to get operationId: getWindsheildWiperStatusesById description: | Obtain a list of changes in windshield wiper status for a specific vehicle. responses: '200': description: windshield wiper statuses content: application/json: schema: $ref: '#/components/schemas/exve.resources.WindshieldWiperStatuses' '401': $ref: '#/components/responses/UnauthorizedError' components: responses: UnauthorizedError: description: Access token is missing or invalid securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: exve.resources: type: object required: - resources properties: resources: type: array uniqueItems: true items: type: object properties: name: type: string example: 'odometers' version: type: string example: '1.0' href: type: string example: '/exve/vehicles/{vehicleId}/odometers' exve.resources.AcceleratorPedalPositions: type: object required: - acceleratorPedalPositions properties: acceleratorPedalPositions: type: array uniqueItems: true items: type: object properties: value: type: integer example: 40 units: type: string example: 'percent' timestamp: type: string format: date-time exve.resources.AutomationLevels: type: object required: - automationLevels properties: automationLevels: type: array uniqueItems: true items: type: object properties: level: type: integer minimum: 0 maximum: 5 description: SAE J3016 automation level. timestamp: type: string format: date-time exve.resources.BrakePedalPositions: type: object required: - brakePedalPositions properties: brakePedalPositions: type: array uniqueItems: true items: type: object properties: value: type: integer example: 40 units: type: string example: 'percent' timestamp: type: string format: date-time exve.resources.FuelLevels: type: object required: - fuelLevels properties: fuelLevels: type: array uniqueItems: true items: type: object properties: value: type: integer example: 40 units: type: string example: 'percent' timestamp: type: string format: date-time exve.resources.DoorStatuses: type: object required: - doorStatuses properties: doorStatuses: type: array uniqueItems: true items: type: object properties: value: type: string enum: - all_locked - all_unlocked - driver - passenger - rear_left - rear_right timestamp: type: string format: date-time exve.resources.HeadlampStatuses: type: object required: - headlampStatuses properties: headlampStatuses: type: array uniqueItems: true items: type: object properties: value: type: boolean example: true timestamp: type: string format: date-time exve.resources.HighBeamStatuses: type: object required: - highBeamStatuses properties: highBeamStatuses: type: array uniqueItems: true items: type: object properties: value: type: boolean example: true timestamp: type: string format: date-time exve.resources.IgnitionStatuses: type: object required: - ignitionStatuses properties: ignitionStatuses: type: array uniqueItems: true items: type: object properties: value: type: string enum: - off - accessory - run - start example: 'off' timestamp: type: string format: date-time exve.resources.Locations: type: object required: - locations properties: locations: type: array uniqueItems: true items: type: object required: - latitude - longitude - bearing - timestamp properties: latitude: type: number example: 48.0202599980004 longitude: type: number example: 11.58485 bearing: type: integer example: 45 description: Bearing in degrees. timestamp: type: string format: date-time exve.resources.Odometers: type: object required: - odometers properties: odometers: type: array uniqueItems: true items: type: object properties: value: type: number example: 1000.25 units: type: string example: 'km' timestamp: type: string format: date-time exve.resources.ParkingBrakeStatuses: type: object required: - parkingBrakeStatuses properties: parkingBrakeStatuses: type: array uniqueItems: true items: type: object properties: value: type: boolean example: true timestamp: type: string format: date-time exve.resources.WindshieldWiperStatuses: type: object required: - windshieldWiperStatuses properties: windshieldWiperStatuses: type: array uniqueItems: true items: type: object properties: value: type: boolean example: true timestamp: type: string format: date-time models.FleetDetail: type: object properties: fleetId: type: integer format: int64 example: 234 vehicles: type: array items: $ref: '#/components/schemas/types.VehicleID' models.VehicleDetail: type: object required: - AutoID properties: AutoID: type: integer format: int64 DriverID: type: integer format: int64 FleetID: type: integer format: int64 OwnerID: type: integer format: int64 Name: type: string example: 'My Car' Make: type: string example: 'Opel' Model: type: string example: 'Astra' Year: type: integer VIN: type: string description: 'Vehicle identification number in accordance with ISO 3779:2009' minLength: 0 maxLength: 17 example: 'WP0ZZZ99ZTS392124' LicensePlate: type: string RegistrationExpiry: type: string format: date FuelCapacity: type: string Odometer: type: number format: double minimum: 0 maximum: 16777214 PolicyID: type: string Notes: type: string description: 'Optional field to enter owner notes about the vehicle' example: 'My work car' PhotoUrls: type: array items: type: string example: 'http://www.example.com/images/mycar.png' DriveTrain: type: string EngineType: type: string ExteriorColor: type: string InteriorColor: type: string Transmission: type: string models.VehicleEvent: type: object required: - EventID properties: EventID: type: integer format: int64 JourneyID: type: string AutoID: type: integer format: int64 DriverID: type: integer format: int64 EventCategoryID: type: integer format: int32 automation_level: type: integer minimum: 0 maximum: 5 description: SAE J3016 automation level. steering_wheel_angle: type: number format: float minimum: -600 maximum: 600 torque_at_transmission: type: number format: float minimum: -500 maximum: 1500 engine_speed: type: number format: float minimum: 0 maximum: 16382 vehicle_speed: type: number format: float minimum: 0 maximum: 655 accelerator_pedal_position: type: number format: float minimum: 0 maximum: 100 parking_brake_status: type: string enum: - 'true' - 'false' brake_pedal_status: type: string enum: - 'true' - 'false' transmission_gear_position: type: string enum: - first - second - third - fourth - fifth - sixth - seventh - eighth - ninth - tenth - reverse - neutral gear_lever_position: type: string enum: - drive - sport - low - first - second - third - fourth - fifth - sixth - seventh - eighth - ninth - tenth - reverse - neutral odometer: type: number format: double minimum: 0 maximum: 16777214 ignition_status: $ref: '#/components/schemas/types.IgnitionStatus' fuel_level: type: number format: float description: percentage fuel remaining level minimum: 0 maximum: 150 fuel_consumed_since_restart: type: number format: double description: >- fuel consumed in litres (this goes to 0 every time the vehicle restarts, like a trip meter) minimum: 0 maximum: 4294967295 door_status: type: string enum: - all_locked - all_unlocked - driver - passenger - rear_left - rear_right headlamp_status: type: string enum: - 'true' - 'false' high_beam_status: type: string enum: - 'true' - 'false' windshield_wiper_status: type: string enum: - 'true' - 'false' latitude: type: number format: float longitude: type: number format: float bearing: type: number format: float accuracy: type: number format: float timestamp: type: string format: date-time accel_x: type: number format: float accel_y: type: number format: float accel_z: type: number format: float gyro_x: type: number format: float gyro_y: type: number format: float gyro_z: type: number format: float models.VehicleNotification: type: object required: - text properties: text: type: string example: 'Harsh braking detected' types.FleetID: type: object required: - fleetId properties: fleetId: type: integer format: int64 example: 234 types.IgnitionStatus: type: string enum: - off - accessory - run - start types.VehicleID: type: object required: - vehicleId properties: vehicleId: type: integer format: int64 example: 1 webhooks: type: array items: type: string enum: - automation_level_changed - driver_changed - journey_begin - journey_end - location_changed - ignition_changed - harsh_acceleration - harsh_braking example: [automation_level_changed, driver_changed, journey_begin, journey_end, location_changed, ignition_changed, harsh_acceleration, harsh_braking] uniqueItems: true webhooks.AutomationLevelChange: type: object properties: vehicleId: type: integer example: 123 old_level: type: integer minimum: 0 maximum: 5 example: 2 description: SAE J3016 automation level new_level: type: integer minimum: 0 maximum: 5 example: 3 description: SAE J3016 automation level timestamp: type: string format: date-time webhooks.DriverChange: type: object properties: vehicleId: type: integer example: 123 old_driverId: type: integer example: 456 new_driverId: type: integer example: 200 timestamp: type: string format: date-time webhooks.HarshPedalEvent: type: object properties: vehicleId: type: integer example: 123 driverId: type: integer example: 456 pedal_start_position: type: integer description: Pedal position as a percentage example: 25 pedal_end_position: type: integer description: Pedal position as a percentage example: 95 timestamp: type: string format: date-time webhooks.IgnitionChange: type: object properties: vehicleId: type: integer example: 123 driverId: type: integer example: 456 ignition_start_state: $ref: '#/components/schemas/types.IgnitionStatus' ignition_end_state: $ref: '#/components/schemas/types.IgnitionStatus' timestamp: type: string format: date-time webhooks.JourneyChange: type: object properties: vehicleId: type: integer example: 123 driverId: type: integer example: 456 latitude: type: number example: 48.0202599980004 longitude: type: number example: 11.58485 bearing: type: integer example: 45 description: Bearing in degrees. timestamp: type: string format: date-time webhooks.LocationChange: type: object required: - vehicleId - latitude - longitude - bearing - timestamp properties: vehicleId: type: integer example: 123 latitude: type: number example: 48.0202599980004 longitude: type: number example: 11.58485 bearing: type: integer example: 45 timestamp: type: string format: date-time webhooks.Subscription: type: object required: - subscriptionId properties: subscriptionId: type: string format: uuid example: '3701fac0-391b-4ad7-8392-8cba1ae5feca'