aboutsummaryrefslogtreecommitdiff
path: root/swagger.json
diff options
context:
space:
mode:
Diffstat (limited to 'swagger.json')
-rw-r--r--swagger.json292
1 files changed, 291 insertions, 1 deletions
diff --git a/swagger.json b/swagger.json
index 8fdbbf867..cd44c953a 100644
--- a/swagger.json
+++ b/swagger.json
@@ -1108,6 +1108,240 @@
}
}
}
+ },
+ "/reports/route": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "deviceId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "groupId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Position"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/reports/events": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "deviceId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "groupId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "type",
+ "in": "query",
+ "description": "% can be used to return events of all types",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Event"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/reports/summary": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "deviceId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "groupId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ReportSummary"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/reports/trips": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "deviceId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "groupId",
+ "in": "query",
+ "description": "at least one deviceId or one groupId must be passed",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ReportTrips"
+ }
+ }
+ }
+ }
+ }
}
},
"definitions": {
@@ -1118,7 +1352,7 @@
},
"deviceId": {
"type": "integer"
- },
+ },
"protocol": {
"type": "string"
},
@@ -1405,6 +1639,62 @@
},
"attributes": {}
}
+ },
+ "ReportSummary": {
+ "properties": {
+ "deviceId": {
+ "type": "integer"
+ },
+ "deviceName": {
+ "type": "string"
+ },
+ "maxSpeed": {
+ "type": "number"
+ },
+ "averageSpeed": {
+ "type": "number"
+ },
+ "distance": {
+ "type": "number"
+ },
+ "engineHours": {
+ "type": "integer"
+ }
+ }
+ },
+ "ReportTrips": {
+ "properties": {
+ "deviceId": {
+ "type": "integer"
+ },
+ "deviceName": {
+ "type": "string"
+ },
+ "maxSpeed": {
+ "type": "number"
+ },
+ "averageSpeed": {
+ "type": "number"
+ },
+ "distance": {
+ "type": "number"
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "startTime": {
+ "type": "string"
+ },
+ "startAddress": {
+ "type": "string"
+ },
+ "endTime": {
+ "type": "string"
+ },
+ "endAddress": {
+ "type": "string"
+ }
+ }
}
}
} \ No newline at end of file