From 2e034b0221805ca2fe7388ff2cfecbab12e8291b Mon Sep 17 00:00:00 2001 From: Samsara CI Date: Thu, 1 Jul 2021 01:40:28 +0000 Subject: [PATCH] Update Swagger Documentation --- markdown/getsafetyactivityeventfeed.md | 14 +- swagger-readme.json | 176 ++++-------------------- swagger.json | 178 ++++--------------------- 3 files changed, 54 insertions(+), 314 deletions(-) diff --git a/markdown/getsafetyactivityeventfeed.md b/markdown/getsafetyactivityeventfeed.md index 7868b9e..5d5705c 100644 --- a/markdown/getsafetyactivityeventfeed.md +++ b/markdown/getsafetyactivityeventfeed.md @@ -2,26 +2,14 @@ | Property Name | Description | | :------------ | :---------- | | **data**
_object array_ | Paginated safety event activity feed limited to 10 events. | -| **    id**
_    string_ | The ID of the activity feed line item. | -| **    operation**
_    string_ | The type of operation that occured in the safety event. Valid values: `create`, `update`, `delete`. | +| **    id**
_    string_ | The ID of the activity event feed line item. | | **    safetyEvent**
_    object_ | The safety event that was updated. | -| **        behaviorLabels**
_        object array_ | List of behavior labels associated with this safety event. | -| **            label**
_            string_ | The label associated with the safety event. This list often changes, so it is recommended that clients gracefully handle any types not enumerated in this list. Valid values: `invalid`, `genericTailgating`, `genericDistraction`, `defensiveDriving`, `rollingStop`, `nearCollision`, `speeding`, `obstructedCamera`, `didNotYield`, `noSeatbelt`, `mobileUsage`, `drowsy`, `laneDeparture`, `followingDistanceSevere`, `followingDistanceModerate`, `lateResponse`, `acceleration`, `braking`, `harshTurn`, `crash`, `rolloverProtection`, `yawControl`, `ranRedLight`, `forwardCollisionWarning`, `eatingDrinking`, `smoking`, `followingDistance`, `edgeDistractedDriving`, `policyViolationMask`, `eating`, `drinking`, `edgeRailroadCrossingViolation`. | -| **            source**
_            string_ | The source of the label associated with the safety event. Valid values: `invalid`, `system`, `samsaraUser`, `customerUser`, `dataMigration`, `device`, `driverUser`. | -| **        downloadForwardVideoUrl**
_        string_ | URL to download the forward video. | -| **        downloadInwardVideoUrl**
_        string_ | URL to download the inward video. | | **        driver**
_        object_ | A minified driver object. | | **            id**
_            string_ | ID of the driver. | -| **            name**
_            string_ | Name of the driver. | | **        id**
_        string_ | The unique Samsara ID of the safety event. | -| **        location**
_        object_ | Location object | -| **            latitude**
_            number_ | GPS latitude represented in degrees | -| **            longitude**
_            number_ | GPS longitude represented in degrees | -| **        maxAccelerationGForce**
_        number_ | The maximum acceleration value as a multiplier on the force of gravity (g). | | **        time**
_        string_ | The time the safety event occurred in RFC 3339 milliseconds format. | | **        vehicle**
_        object_ | A minified vehicle object. | | **            id**
_            string_ | ID of the vehicle. | -| **            name**
_            string_ | Name of the vehicle. | | **    time**
_    string_ | The time the activity occurred in the corresponding safety event in RFC 3339 milliseconds format. | | **    type**
_    string_ | The type of activity that occurred in the safety event. We currently only support InboxActivityType, BehaviorLabelActivityType, and CreateSafetyEventType, but we may add support for more activity types in the future. Valid values: `BehaviorLabelActivityType`, `CreateSafetyEventActivityType`, `InboxActivityType`. | | **pagination**
_object_ | Pagination parameters. | diff --git a/swagger-readme.json b/swagger-readme.json index becdeb6..8d7c07b 100644 --- a/swagger-readme.json +++ b/swagger-readme.json @@ -1788,65 +1788,6 @@ }, "type": "object" }, - "BehaviorLabelsObjectResponseBody": { - "description": "The most up-to-date behavior labels associated with the safety event. These labels can be updated by the Safety Report Admin.", - "properties": { - "label": { - "description": "The label associated with the safety event. This list often changes, so it is recommended that clients gracefully handle any types not enumerated in this list.", - "enum": [ - "invalid", - "genericTailgating", - "genericDistraction", - "defensiveDriving", - "rollingStop", - "nearCollision", - "speeding", - "obstructedCamera", - "didNotYield", - "noSeatbelt", - "mobileUsage", - "drowsy", - "laneDeparture", - "followingDistanceSevere", - "followingDistanceModerate", - "lateResponse", - "acceleration", - "braking", - "harshTurn", - "crash", - "rolloverProtection", - "yawControl", - "ranRedLight", - "forwardCollisionWarning", - "eatingDrinking", - "smoking", - "followingDistance", - "edgeDistractedDriving", - "policyViolationMask", - "eating", - "drinking", - "edgeRailroadCrossingViolation" - ], - "example": "genericTailgating", - "type": "string" - }, - "source": { - "description": "The source of the label associated with the safety event.", - "enum": [ - "invalid", - "system", - "samsaraUser", - "customerUser", - "dataMigration", - "device", - "driverUser" - ], - "example": "automated", - "type": "string" - } - }, - "type": "object" - }, "CameraMediaGetCameraMediaBadGatewayErrorResponseBody": { "description": "Bad Gateway", "properties": { @@ -5340,22 +5281,6 @@ "maxLength": 4096, "type": "string" }, - "DriverObjectResponseBody": { - "description": "A minified driver object.", - "properties": { - "id": { - "description": "ID of the driver.", - "example": "0987", - "type": "string" - }, - "name": { - "description": "Name of the driver.", - "example": "Driver Name", - "type": "string" - } - }, - "type": "object" - }, "DriverPassword": { "description": "Password that the driver can use to login to the Samsara driver app.", "example": "aSecurePassword1234", @@ -13378,18 +13303,8 @@ "description": "Safety event activity feed item.", "properties": { "id": { - "description": "The ID of the activity feed line item.", - "example": "212014918174029-1550954461759-1622151765", - "type": "string" - }, - "operation": { - "description": "The type of operation that occured in the safety event.", - "enum": [ - "create", - "update", - "delete" - ], - "example": "create", + "description": "The ID of the activity event feed line item.", + "example": "1622151765-212014918174029-1550954461759", "type": "string" }, "safetyEvent": { @@ -13413,7 +13328,6 @@ }, "required": [ "id", - "operation", "safetyEvent", "time", "type" @@ -13519,6 +13433,17 @@ "SafetyEventDriver": { "$ref": "#/components/schemas/driverTinyResponse" }, + "SafetyEventDriverObjectResponseBody": { + "description": "A minified driver object.", + "properties": { + "id": { + "description": "ID of the driver.", + "example": "0987", + "type": "string" + } + }, + "type": "object" + }, "SafetyEventId": { "description": "The unique Samsara ID of the safety event.", "example": "212014918174029-1550954461759", @@ -13535,47 +13460,21 @@ "SafetyEventObjectResponseBody": { "description": "The safety event that was updated.", "properties": { - "behaviorLabels": { - "description": "List of behavior labels associated with this safety event.", - "items": { - "$ref": "#/components/schemas/BehaviorLabelsObjectResponseBody" - }, - "type": "array" - }, - "downloadForwardVideoUrl": { - "description": "URL to download the forward video.", - "example": "https://s3.console.aws.amazon.com/s3/buckets/samsara-dashcam-videos/21575/212014918400828/1553060687222/huKA7IhpBV-camera-video-segment-1244214895.mp4", - "type": "string" - }, - "downloadInwardVideoUrl": { - "description": "URL to download the inward video.", - "example": "https://s3.console.aws.amazon.com/s3/buckets/samsara-dashcam-videos/21575/212014918400828/1553060687222/huKA7IhpBV-camera-video-segment-1244214895.mp4", - "type": "string" - }, "driver": { - "$ref": "#/components/schemas/DriverObjectResponseBody" + "$ref": "#/components/schemas/SafetyEventDriverObjectResponseBody" }, "id": { "description": "The unique Samsara ID of the safety event.", "example": "212014918174029-1550954461759", "type": "string" }, - "location": { - "$ref": "#/components/schemas/locationResponseBody" - }, - "maxAccelerationGForce": { - "description": "The maximum acceleration value as a multiplier on the force of gravity (g).", - "example": 0.123, - "format": "double", - "type": "number" - }, "time": { "description": "The time the safety event occurred in RFC 3339 milliseconds format.", "example": "2019-06-13T19:08:25.455Z", "type": "string" }, "vehicle": { - "$ref": "#/components/schemas/VehicleObjectResponseBody" + "$ref": "#/components/schemas/SafetyEventVehicleObjectResponseBody" } }, "type": "object" @@ -13588,6 +13487,17 @@ "SafetyEventVehicle": { "$ref": "#/components/schemas/vehicleTinyResponse" }, + "SafetyEventVehicleObjectResponseBody": { + "description": "A minified vehicle object.", + "properties": { + "id": { + "description": "ID of the vehicle.", + "example": "1234", + "type": "string" + } + }, + "type": "object" + }, "SafetyEventsGetSafetyActivityEventFeedBadGatewayErrorResponseBody": { "description": "Bad Gateway", "properties": { @@ -24282,22 +24192,6 @@ "maxLength": 255, "type": "string" }, - "VehicleObjectResponseBody": { - "description": "A minified vehicle object.", - "properties": { - "id": { - "description": "ID of the vehicle.", - "example": "1234", - "type": "string" - }, - "name": { - "description": "Name of the vehicle.", - "example": "Vehicle Name", - "type": "string" - } - }, - "type": "object" - }, "VehicleOdometerMeters": { "description": "A manual override for the vehicle's odometer. You may only override a vehicle's odometer if it cannot be read from on-board diagnostics. When you provide a manual odometer override, Samsara will begin updating a vehicle's odometer using GPS distance traveled since this override was set. See \u003ca href=\"https://kb.samsara.com/hc/en-us/articles/115005273667\" target=\"_blank\"\u003ehere\u003c/a\u003e for more details.", "example": 9182, @@ -28242,24 +28136,6 @@ ], "type": "object" }, - "locationResponseBody": { - "description": "Location object", - "properties": { - "latitude": { - "description": "GPS latitude represented in degrees", - "example": 37.456345, - "format": "double", - "type": "number" - }, - "longitude": { - "description": "\tGPS longitude represented in degrees", - "example": 34.5633749, - "format": "double", - "type": "number" - } - }, - "type": "object" - }, "longitude": { "description": "The longitude of the asset in decimal degrees.", "example": -122.403098, diff --git a/swagger.json b/swagger.json index a8a2e38..1ec2a0a 100644 --- a/swagger.json +++ b/swagger.json @@ -11040,65 +11040,6 @@ } } }, - "BehaviorLabelsObjectResponseBody": { - "description": "The most up-to-date behavior labels associated with the safety event. These labels can be updated by the Safety Report Admin.", - "type": "object", - "properties": { - "label": { - "description": "The label associated with the safety event. This list often changes, so it is recommended that clients gracefully handle any types not enumerated in this list.", - "type": "string", - "enum": [ - "invalid", - "genericTailgating", - "genericDistraction", - "defensiveDriving", - "rollingStop", - "nearCollision", - "speeding", - "obstructedCamera", - "didNotYield", - "noSeatbelt", - "mobileUsage", - "drowsy", - "laneDeparture", - "followingDistanceSevere", - "followingDistanceModerate", - "lateResponse", - "acceleration", - "braking", - "harshTurn", - "crash", - "rolloverProtection", - "yawControl", - "ranRedLight", - "forwardCollisionWarning", - "eatingDrinking", - "smoking", - "followingDistance", - "edgeDistractedDriving", - "policyViolationMask", - "eating", - "drinking", - "edgeRailroadCrossingViolation" - ], - "example": "genericTailgating" - }, - "source": { - "description": "The source of the label associated with the safety event.", - "type": "string", - "enum": [ - "invalid", - "system", - "samsaraUser", - "customerUser", - "dataMigration", - "device", - "driverUser" - ], - "example": "automated" - } - } - }, "CameraMediaGetCameraMediaBadGatewayErrorResponseBody": { "description": "Bad Gateway", "type": "object", @@ -14634,22 +14575,6 @@ "maxLength": 4096, "example": "Also goes by the nickname Furious Fred." }, - "DriverObjectResponseBody": { - "description": "A minified driver object.", - "type": "object", - "properties": { - "id": { - "description": "ID of the driver.", - "type": "string", - "example": "0987" - }, - "name": { - "description": "Name of the driver.", - "type": "string", - "example": "Driver Name" - } - } - }, "DriverPassword": { "description": "Password that the driver can use to login to the Samsara driver app.", "type": "string", @@ -22634,27 +22559,16 @@ "description": "Safety event activity feed item.", "type": "object", "required": [ + "id", "time", "type", - "operation", - "id", "safetyEvent" ], "properties": { "id": { - "description": "The ID of the activity feed line item.", + "description": "The ID of the activity event feed line item.", "type": "string", - "example": "212014918174029-1550954461759-1622151765" - }, - "operation": { - "description": "The type of operation that occured in the safety event.", - "type": "string", - "enum": [ - "create", - "update", - "delete" - ], - "example": "create" + "example": "1622151765-212014918174029-1550954461759" }, "safetyEvent": { "$ref": "#/definitions/SafetyEventObjectResponseBody" @@ -22775,6 +22689,17 @@ "SafetyEventDriver": { "$ref": "#/definitions/driverTinyResponse" }, + "SafetyEventDriverObjectResponseBody": { + "description": "A minified driver object.", + "type": "object", + "properties": { + "id": { + "description": "ID of the driver.", + "type": "string", + "example": "0987" + } + } + }, "SafetyEventId": { "description": "The unique Samsara ID of the safety event.", "type": "string", @@ -22792,47 +22717,21 @@ "description": "The safety event that was updated.", "type": "object", "properties": { - "behaviorLabels": { - "description": "List of behavior labels associated with this safety event.", - "type": "array", - "items": { - "$ref": "#/definitions/BehaviorLabelsObjectResponseBody" - } - }, - "downloadForwardVideoUrl": { - "description": "URL to download the forward video.", - "type": "string", - "example": "https://s3.console.aws.amazon.com/s3/buckets/samsara-dashcam-videos/21575/212014918400828/1553060687222/huKA7IhpBV-camera-video-segment-1244214895.mp4" - }, - "downloadInwardVideoUrl": { - "description": "URL to download the inward video.", - "type": "string", - "example": "https://s3.console.aws.amazon.com/s3/buckets/samsara-dashcam-videos/21575/212014918400828/1553060687222/huKA7IhpBV-camera-video-segment-1244214895.mp4" - }, "driver": { - "$ref": "#/definitions/DriverObjectResponseBody" + "$ref": "#/definitions/SafetyEventDriverObjectResponseBody" }, "id": { "description": "The unique Samsara ID of the safety event.", "type": "string", "example": "212014918174029-1550954461759" }, - "location": { - "$ref": "#/definitions/locationResponseBody" - }, - "maxAccelerationGForce": { - "description": "The maximum acceleration value as a multiplier on the force of gravity (g).", - "type": "number", - "format": "double", - "example": 0.123 - }, "time": { "description": "The time the safety event occurred in RFC 3339 milliseconds format.", "type": "string", "example": "2019-06-13T19:08:25.455Z" }, "vehicle": { - "$ref": "#/definitions/VehicleObjectResponseBody" + "$ref": "#/definitions/SafetyEventVehicleObjectResponseBody" } } }, @@ -22844,6 +22743,17 @@ "SafetyEventVehicle": { "$ref": "#/definitions/vehicleTinyResponse" }, + "SafetyEventVehicleObjectResponseBody": { + "description": "A minified vehicle object.", + "type": "object", + "properties": { + "id": { + "description": "ID of the vehicle.", + "type": "string", + "example": "1234" + } + } + }, "SafetyEventsGetSafetyActivityEventFeedBadGatewayErrorResponseBody": { "description": "Bad Gateway", "type": "object", @@ -33649,22 +33559,6 @@ "maxLength": 255, "example": "These are notes about this given vehicle." }, - "VehicleObjectResponseBody": { - "description": "A minified vehicle object.", - "type": "object", - "properties": { - "id": { - "description": "ID of the vehicle.", - "type": "string", - "example": "1234" - }, - "name": { - "description": "Name of the vehicle.", - "type": "string", - "example": "Vehicle Name" - } - } - }, "VehicleOdometerMeters": { "description": "A manual override for the vehicle's odometer. You may only override a vehicle's odometer if it cannot be read from on-board diagnostics. When you provide a manual odometer override, Samsara will begin updating a vehicle's odometer using GPS distance traveled since this override was set. See \u003ca href=\"https://kb.samsara.com/hc/en-us/articles/115005273667\" target=\"_blank\"\u003ehere\u003c/a\u003e for more details.", "type": "integer", @@ -37277,24 +37171,6 @@ } } }, - "locationResponseBody": { - "description": "Location object", - "type": "object", - "properties": { - "latitude": { - "description": "GPS latitude represented in degrees", - "type": "number", - "format": "double", - "example": 37.456345 - }, - "longitude": { - "description": "\tGPS longitude represented in degrees", - "type": "number", - "format": "double", - "example": 34.5633749 - } - } - }, "longitude": { "description": "The longitude of the asset in decimal degrees.", "type": "number",