aboutsummaryrefslogtreecommitdiff
path: root/swagger.json
diff options
context:
space:
mode:
authorPhilipp Prangenberg <philipp.prangenberg@derkurier.de>2016-12-05 12:03:08 +0100
committerPhilipp Prangenberg <philipp.prangenberg@derkurier.de>2016-12-05 12:03:08 +0100
commita21f436a58133f7da0cae06366d729665f3b8f9c (patch)
tree72ff1743d96f79e4a9d85b0d48715e5f9aa67cf9 /swagger.json
parent960bf899414d89221e92138fdb98777c3f4f73ec (diff)
parent40607036c5aa6385a7ae3f3a283bf107238a5944 (diff)
downloadtrackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.tar.gz
trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.tar.bz2
trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'swagger.json')
-rw-r--r--swagger.json351
1 files changed, 300 insertions, 51 deletions
diff --git a/swagger.json b/swagger.json
index cd44c953a..25b76963c 100644
--- a/swagger.json
+++ b/swagger.json
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
- "version": "3.7",
+ "version": "3.8",
"title": "traccar"
},
"host": "traccar.org",
@@ -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": [
@@ -546,6 +578,8 @@
},
"/positions": {
"get": {
+ "summary" : "Fetches a list of Positions",
+ "description" : "Without any params, it returns a list of last known positions for all the user's devices",
"consumes": [
"application/json"
],
@@ -556,27 +590,35 @@
{
"name": "deviceId",
"in": "query",
- "description": "deviceId is optional, but requires the from and to parameters when used",
+ "description": "_deviceId_ is optional, but requires the _from_ and _to_ parameters when used",
"required": false,
"type": "integer"
},
{
"name": "from",
"in": "query",
+ "description": "Not required with _id_",
"required": false,
"type": "string"
},
{
"name": "to",
"in": "query",
+ "description": "Not required with _id_",
"required": false,
"type": "string"
+ }, {
+ "name" : "id",
+ "in" : "query",
+ "description" : "To fetch one or more positions. Multiple params can be passed like `id=31&id=42`",
+ "required" : false,
+ "type" : "integer",
+ "collectionFormat" : "multi"
}
],
"responses": {
"200": {
"description": "OK",
- "headers": {},
"schema": {
"type": "array",
"items": {
@@ -724,7 +766,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/Position"
+ "$ref": "#/definitions/User"
}
}
}
@@ -879,7 +921,7 @@
}
},
"/commandtypes": {
- "post": {
+ "get": {
"consumes": [
"application/json"
],
@@ -940,6 +982,12 @@
"in": "query",
"required": true,
"type": "integer"
+ },
+ {
+ "name": "refresh",
+ "in": "query",
+ "required": false,
+ "type": "boolean"
}
],
"responses": {
@@ -1040,48 +1088,6 @@
}
}
},
- "/events": {
- "get": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "deviceId",
- "in": "query",
- "required": true,
- "type": "integer"
- },
- {
- "name": "type",
- "in": "query",
- "required": true,
- "type": "string"
- },
- {
- "name": "interval",
- "in": "query",
- "required": true,
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "headers": {},
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Event"
- }
- }
- }
- }
- }
- },
"/events/{id}": {
"get": {
"consumes": [
@@ -1342,6 +1348,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": {
@@ -1409,9 +1565,6 @@
"map": {
"type": "string"
},
- "language": {
- "type": "string"
- },
"distanceUnit": {
"type": "string"
},
@@ -1433,6 +1586,21 @@
"twelveHourFormat": {
"type": "boolean"
},
+ "coordinateFormat": {
+ "type": "string"
+ },
+ "disabled": {
+ "type": "boolean"
+ },
+ "expirationTime": {
+ "type": "string"
+ },
+ "deviceLimit": {
+ "type": "integer"
+ },
+ "token": {
+ "type": "string"
+ },
"attributes": {}
}
},
@@ -1474,6 +1642,15 @@
"twelveHourFormat": {
"type": "boolean"
},
+ "version": {
+ "type": "string"
+ },
+ "forceSettings": {
+ "type": "boolean"
+ },
+ "coordinateFormat": {
+ "type": "string"
+ },
"attributes": {}
}
},
@@ -1511,6 +1688,18 @@
"groupId": {
"type": "integer"
},
+ "phone": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "contact": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
"geofenceIds": {},
"attributes": {}
}
@@ -1688,13 +1877,73 @@
"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"
}
}
}
}
-} \ No newline at end of file
+}