aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-31 21:18:22 +1300
committerGitHub <noreply@github.com>2016-10-31 21:18:22 +1300
commit121b837010c3cf89d3188a6cba1a202baf7ad6e2 (patch)
treedc137970997936f56f6c0276b04375f27deb60a1
parentcfb6bfcb4f7cf945f749634ccfc981e63dba6022 (diff)
parent825a751b13dbf5c27b647363477d6b21d3ab4a41 (diff)
downloadtrackermap-server-121b837010c3cf89d3188a6cba1a202baf7ad6e2.tar.gz
trackermap-server-121b837010c3cf89d3188a6cba1a202baf7ad6e2.tar.bz2
trackermap-server-121b837010c3cf89d3188a6cba1a202baf7ad6e2.zip
Merge pull request #2498 from Abyss777/swagger_update
Update swagger.json with recent changes
-rw-r--r--swagger.json260
1 files changed, 260 insertions, 0 deletions
diff --git a/swagger.json b/swagger.json
index 0e19bf5a8..f00f7dfe2 100644
--- a/swagger.json
+++ b/swagger.json
@@ -159,6 +159,38 @@
}
}
},
+ "/devices/{id}/distance": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DeviceTotalDistance"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content",
+ "headers": {}
+ }
+ }
+ }
+ },
"/devices/geofences": {
"post": {
"consumes": [
@@ -940,6 +972,12 @@
"in": "query",
"required": true,
"type": "integer"
+ },
+ {
+ "name": "refresh",
+ "in": "query",
+ "required": false,
+ "type": "boolean"
}
],
"responses": {
@@ -1300,6 +1338,156 @@
}
}
}
+ },
+ "/statistics": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "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/Statistics"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/attributes/aliases": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "deviceId",
+ "in": "query",
+ "required": false,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/AttributeAlias"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/AttributeAlias"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/AttributeAlias"
+ }
+ }
+ }
+ }
+ },
+ "/attributes/aliases/{id}": {
+ "put": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/AttributeAlias"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/AttributeAlias"
+ }
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content",
+ "headers": {}
+ }
+ }
+ }
}
},
"definitions": {
@@ -1469,6 +1657,18 @@
"groupId": {
"type": "integer"
},
+ "phone": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "contact": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
"geofenceIds": {},
"attributes": {}
}
@@ -1646,11 +1846,71 @@
"startAddress": {
"type": "string"
},
+ "startLat": {
+ "type": "number"
+ },
+ "startLon": {
+ "type": "number"
+ },
"endTime": {
"type": "string"
},
"endAddress": {
"type": "string"
+ },
+ "endLat": {
+ "type": "number"
+ },
+ "endLon": {
+ "type": "number"
+ }
+ }
+ },
+ "Statistics": {
+ "properties": {
+ "captureTime": {
+ "type": "string"
+ },
+ "activeUsers": {
+ "type": "integer"
+ },
+ "activeDevices": {
+ "type": "integer"
+ },
+ "requests": {
+ "type": "integer"
+ },
+ "messagesReceived": {
+ "type": "integer"
+ },
+ "messagesStored": {
+ "type": "integer"
+ }
+ }
+ },
+ "AttributeAlias": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "deviceId": {
+ "type": "integer"
+ },
+ "attribute": {
+ "type": "string"
+ },
+ "alias": {
+ "type": "string"
+ }
+ }
+ },
+ "DeviceTotalDistance": {
+ "properties": {
+ "deviceId": {
+ "type": "integer"
+ },
+ "totalDistance": {
+ "type": "number"
}
}
}