aboutsummaryrefslogtreecommitdiff
path: root/swagger.json
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-29 17:45:34 +1200
committerGitHub <noreply@github.com>2016-08-29 17:45:34 +1200
commite65a701cb52ec0b5a32228b4f922cdc1a0a6fd6a (patch)
tree7f23e086e2a652f4fbd7e873c251a5cb03fa82bb /swagger.json
parentae5fe50416df190f5374d084526518a22096871e (diff)
parentf21eedf4d319e0478fa22c86ec5587923306c1ff (diff)
downloadtrackermap-server-e65a701cb52ec0b5a32228b4f922cdc1a0a6fd6a.tar.gz
trackermap-server-e65a701cb52ec0b5a32228b4f922cdc1a0a6fd6a.tar.bz2
trackermap-server-e65a701cb52ec0b5a32228b4f922cdc1a0a6fd6a.zip
Merge pull request #2266 from Abyss777/swagger
Actualize swagger.json with reports
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