-
-
Save DriveQuantPublic/66b90111a046739f1392bfb3fdae0da8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.0 | |
| info: | |
| title: PushCrashData | |
| version: '1.0' | |
| description: 'This API contains an example endpoint to push crash data collected by the DriveKit SDK integrated into a mobile application.' | |
| servers: | |
| - url: 'https://api.example.com' | |
| description: 'My Company API Server' | |
| paths: | |
| /push/crash: | |
| post: | |
| summary: 'Push crash data' | |
| operationId: post-push-crash | |
| responses: | |
| '200': | |
| description: OK | |
| '401': | |
| description: Unauthorized | |
| description: 'The push crash data API receives the crash data sent by the DriveKit SDK integrated into a mobile application, and allows DriveQuant to process and analyze crash events.' | |
| parameters: | |
| - schema: | |
| type: string | |
| in: header | |
| description: 'Authorization header (preferably OAuth2 token)' | |
| name: Authorization | |
| requestBody: | |
| content: | |
| application/json: | |
| schema: | |
| description: '' | |
| type: object | |
| properties: | |
| crashId: | |
| type: string | |
| description: Unique crash identifier | |
| customerId: | |
| type: string | |
| description: DriveQuant customer ID | |
| driverId: | |
| type: string | |
| description: DriveQuant user ID | |
| userId: | |
| type: string | |
| description: DriveKit user ID | |
| parameters: | |
| type: object | |
| description: DriveKit SDK crash recording configuration | |
| required: | |
| - localTripId | |
| - date | |
| - gpsWindowPos | |
| - gpsWindowNeg | |
| - imuWindowNeg | |
| - imuWindowPos | |
| - imuFrequency | |
| - installationId | |
| properties: | |
| localTripId: | |
| type: string | |
| description: Local and unique trip identifier generated by DriveKit SDK | |
| date: | |
| type: string | |
| example: '2019-04-19T01:11:00.000+0000' | |
| description: Crash date | |
| tripStartDate: | |
| type: string | |
| example: '2019-04-18T23:58:00.000+0000' | |
| description: Trip start date | |
| gpsWindowNeg: | |
| type: number | |
| description: Recording duration of GPS data before detection in seconds | |
| gpsWindowPos: | |
| type: number | |
| description: Recording duration of GPS data after detection in seconds | |
| imuWindowNeg: | |
| type: number | |
| description: Recording duration of IMU data before detection in seconds | |
| imuWindowPos: | |
| type: number | |
| description: Recording duration of IMU data after detection in seconds | |
| imuFrequency: | |
| type: number | |
| description: Recording frequency of the accelerometer in Hz | |
| installationId: | |
| type: number | |
| description: Unique identifier of an installation | |
| gps: | |
| type: object | |
| description: GPS data recorded during the crash | |
| required: | |
| - timestamp | |
| - latitude | |
| - longitude | |
| - velocity | |
| - heading | |
| - accuracy | |
| - elevation | |
| properties: | |
| timestamp: | |
| type: array | |
| description: Time in seconds | |
| items: | |
| type: number | |
| latitude: | |
| type: array | |
| description: Latitude in degrees | |
| items: | |
| type: number | |
| longitude: | |
| type: array | |
| description: Longitude in degrees | |
| items: | |
| type: number | |
| velocity: | |
| type: array | |
| description: Velovity in km/h | |
| items: | |
| type: number | |
| heading: | |
| type: array | |
| description: Heading in degrees | |
| items: | |
| type: number | |
| accuracy: | |
| type: array | |
| description: Accuracy in meters | |
| items: | |
| type: number | |
| elevation: | |
| type: array | |
| description: GPS elevation in meters | |
| items: | |
| type: number | |
| movements: | |
| type: object | |
| description: Accelerometer data recorded during the crash | |
| required: | |
| - timestamp | |
| - accelerationX | |
| - accelerationY | |
| - accelerationZ | |
| properties: | |
| timestamp: | |
| type: array | |
| description: Time in ms | |
| items: | |
| type: integer | |
| accelerationX: | |
| type: array | |
| description: Acceleration component along the East axis in the Earth reference frame in milli-G | |
| items: | |
| type: integer | |
| accelerationY: | |
| type: array | |
| description: Acceleration component along the North axis in the Earth reference frame in milli-G | |
| items: | |
| type: integer | |
| accelerationZ: | |
| type: array | |
| description: Acceleration in the vertical direction, perpendicular to the Earth's surface in milli-G | |
| items: | |
| type: integer | |
| gpsFeatures: | |
| type: object | |
| description: Features computed from GPS data | |
| required: | |
| - index | |
| - time | |
| - latitude | |
| - longitude | |
| - crashType | |
| - stopTime | |
| - stopDuration | |
| - stopDistance | |
| - velocity | |
| - velocityMin | |
| - velocityMax | |
| - velocityClass | |
| - velocityPreNear | |
| - velocityPreFar | |
| - velocityPostNear | |
| - velocityPostFar | |
| - velocityOffsetNear | |
| - velocityOffsetFar | |
| - acceleration | |
| - accelerationMin | |
| - accelerationMax | |
| - heading | |
| - yawRate | |
| - yawRateMin | |
| - yawRateMax | |
| - available | |
| properties: | |
| index: | |
| type: integer | |
| description: Index of crash in the GPS array | |
| time: | |
| type: number | |
| description: Time of crash in the GPS array | |
| latitude: | |
| type: number | |
| description: Latitude at time of crash in degree | |
| longitude: | |
| type: number | |
| description: Longitude at time of crash in degree | |
| crashType: | |
| type: integer | |
| description: Type of crash | |
| stopTime: | |
| type: number | |
| description: Vehicle stop time in s | |
| stopDuration: | |
| type: number | |
| description: Vehicle stop duration in s | |
| stopDistance: | |
| type: integer | |
| description: Vehicle stop distance in m | |
| velocity: | |
| type: number | |
| description: Velocity at time of crash in km/h | |
| velocityMin: | |
| type: number | |
| description: Maximum velocity in km/h | |
| velocityMax: | |
| type: number | |
| description: Minimum velocity in km/h | |
| velocityClass: | |
| type: integer | |
| description: Velocity class | |
| velocityPreNear: | |
| type: number | |
| description: Velocity 2 seconds before the crash in km/h | |
| velocityPreFar: | |
| type: number | |
| description: Velocity 10 seconds before the crash in km/h | |
| velocityPostNear: | |
| type: number | |
| description: Velocity 2 seconds after the crash in km/h | |
| velocityPostFar: | |
| type: number | |
| description: Velocity 10 seconds after the crash in km/h | |
| velocityOffsetNear: | |
| type: number | |
| description: Velocity difference around the crash (-2s/+2s) in km/h | |
| velocityOffsetFar: | |
| type: number | |
| description: Velocity difference around the crash (-2s/+10s) in km/h | |
| acceleration: | |
| type: number | |
| description: Acceleration at time of crash in m/s2 | |
| accelerationMin: | |
| type: number | |
| description: Minimum value of the acceleration over the whole recording windows in m/s2 | |
| accelerationMax: | |
| type: number | |
| description: Maximum value of the acceleration over the whole recording windows in m/s2 | |
| heading: | |
| type: number | |
| description: Heading at time of crash in degree | |
| yawRate: | |
| type: number | |
| description: Yaw rate at time of crash in rad/s | |
| yawRateMin: | |
| type: number | |
| description: Minimum value of the yaw rate over the whole recording windows in rad/s | |
| yawRateMax: | |
| type: number | |
| description: Maximum value of the yaw rate over the whole recording windows in rad/s | |
| available: | |
| type: boolean | |
| description: GPS data availability | |
| movementFeatures: | |
| type: object | |
| description: Features computed from accelerometer data | |
| required: | |
| - index | |
| - module | |
| - time | |
| - energy | |
| - power | |
| - energyNear | |
| - energyFar | |
| - powerNear | |
| - powerFar | |
| - stdModuleNear | |
| - stdModuleFar | |
| - stdModuleOffset | |
| - entropyNear | |
| - entropyFar | |
| - entropyOffset | |
| - meanModuleNear | |
| - meanModuleFar | |
| - meanModuleOffset | |
| properties: | |
| index: | |
| type: integer | |
| description: Index corresponding to the maximum value of the acceleration Euclidean norm | |
| module: | |
| type: number | |
| description: Maximum value of the acceleration Euclidean norm | |
| time: | |
| type: number | |
| description: Relative time of the maximum value of the acceleration Euclidean norm | |
| energy: | |
| type: number | |
| description: Energy of the acceleration Euclidean norm vector over the whole recording windows | |
| power: | |
| type: number | |
| description: Power of the acceleration Euclidean norm vector over the whole recording windows | |
| energyNear: | |
| type: number | |
| description: Energy of the acceleration Euclidean norm vector around the crash | |
| energyFar: | |
| type: number | |
| description: Energy of the acceleration Euclidean norm vector after crash | |
| powerNear: | |
| type: number | |
| description: Power of the acceleration Euclidean norm vector around the crash | |
| powerFar: | |
| type: number | |
| description: Power of the acceleration Euclidean norm vector after crash | |
| stdModuleNear: | |
| type: number | |
| description: Standard deviation of the acceleration Euclidean norm vector around the crash | |
| stdModuleFar: | |
| type: number | |
| description: Standard deviation of the acceleration Euclidean norm vector after crash | |
| stdModuleOffset: | |
| type: number | |
| description: Acceleration Euclidean norm standard deviation offset | |
| entropyNear: | |
| type: number | |
| description: Shannon entropy of the acceleration Euclidean norm vector around the crash | |
| entropyFar: | |
| type: number | |
| description: Shannon entropy of the acceleration Euclidean norm vector after crash | |
| entropyOffset: | |
| type: number | |
| description: Shannon entropy offset | |
| meanModuleNear: | |
| type: number | |
| description: Mean value of the acceleration Euclidean norm vector around the crash | |
| meanModuleFar: | |
| type: number | |
| description: Mean value of the acceleration Euclidean norm vector after crash | |
| meanModuleOffset: | |
| type: number | |
| description: Acceleration Euclidean norm mean value offset | |
| state: | |
| type: string | |
| enum: | |
| - CONFIRMED | |
| - UNCONFIRMED | |
| - FAILED_TO_PREDICT | |
| description: Crash status | |
| probability: | |
| type: number | |
| minimum: 0 | |
| maximum: 100 | |
| description: Crash probability in % | |
| predictionVersion: | |
| type: string | |
| description: Crash classifier version | |
| metaData: | |
| type: object | |
| description: 'HashMap<String,String> of metaData set in DriveKit SDK' | |
| required: | |
| - crashId | |
| - customerId | |
| - driverId | |
| - userId | |
| - parameters | |
| - gps | |
| - movements | |
| - gpsFeatures | |
| - movementFeatures | |
| - state | |
| - probability | |
| - predictionVersion | |
| - metaData |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment