aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-23 01:04:57 +1200
committerGitHub <noreply@github.com>2016-07-23 01:04:57 +1200
commit8e5441831a6b70fa2af12385c530fd40e56898ae (patch)
tree04e4c6144c684fa58e4c47ed8cddc22110f2b285
parent5d9c7f4dde298d5b02a2aa688bb27949072e2a57 (diff)
parent37d28b62627c2eabe135b58672ce20e8e58bf8d6 (diff)
downloadtrackermap-server-8e5441831a6b70fa2af12385c530fd40e56898ae.tar.gz
trackermap-server-8e5441831a6b70fa2af12385c530fd40e56898ae.tar.bz2
trackermap-server-8e5441831a6b70fa2af12385c530fd40e56898ae.zip
Merge pull request #2140 from Abyss777/update_swagger.json
Update swagger json file
-rw-r--r--swagger.json603
1 files changed, 584 insertions, 19 deletions
diff --git a/swagger.json b/swagger.json
index 12b5020c7..a16794a41 100644
--- a/swagger.json
+++ b/swagger.json
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
- "version": "3.5",
+ "version": "3.7",
"title": "traccar"
},
"host": "traccar.org",
@@ -159,6 +159,59 @@
}
}
},
+ "/devices/geofences": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DeviceGeofence"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/DeviceGeofence"
+ }
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DeviceGeofence"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content",
+ "headers": {}
+ }
+ }
+ }
+ },
"/groups": {
"get": {
"consumes": [
@@ -279,6 +332,59 @@
}
}
},
+ "/groups/geofences": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GroupGeofence"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/GroupGeofence"
+ }
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GroupGeofence"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content",
+ "headers": {}
+ }
+ }
+ }
+ },
"/permissions/devices": {
"post": {
"consumes": [
@@ -385,6 +491,59 @@
}
}
},
+ "/permissions/geofences": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GeofencePermission"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/GeofencePermission"
+ }
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GeofencePermission"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content",
+ "headers": {}
+ }
+ }
+ }
+ },
"/positions": {
"get": {
"consumes": [
@@ -654,11 +813,314 @@
}
}
}
+ },
+ "/users/notifications": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "all",
+ "in": "query",
+ "required": true,
+ "type": "boolean"
+ },
+ {
+ "name": "userId",
+ "in": "query",
+ "required": true,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Notification"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Notification"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/Notification"
+ }
+ }
+ }
+ }
+ },
+ "/commandtypes": {
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "deviceId",
+ "in": "query",
+ "required": true,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/CommandType"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/geofences": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "all",
+ "in": "query",
+ "required": true,
+ "type": "boolean"
+ },
+ {
+ "name": "userId",
+ "in": "query",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "groupId",
+ "in": "query",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "deviceId",
+ "in": "query",
+ "required": true,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Geofence"
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Geofence"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/Geofence"
+ }
+ }
+ }
+ }
+ },
+ "/geofences/{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/Geofence"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/Geofence"
+ }
+ }
+ }
+ },
+ "delete": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No Content",
+ "headers": {}
+ }
+ }
+ }
+ },
+ "/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": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "type": "integer"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "headers": {},
+ "schema": {
+ "$ref": "#/definitions/Event"
+ }
+ }
+ }
+ }
}
},
"definitions": {
"Position": {
"properties": {
+ "id": {
+ "type": "integer"
+ },
+ "protocol": {
+ "type": "string"
+ },
+ "deviceTime": {
+ "type": "string"
+ },
"fixTime": {
"type": "string"
},
@@ -685,13 +1147,14 @@
},
"address": {
"type": "string"
- }
+ },
+ "attributes": {}
}
},
"User": {
"properties": {
"id": {
- "type": "number"
+ "type": "integer"
},
"name": {
"type": "string"
@@ -724,20 +1187,21 @@
"type": "number"
},
"zoom": {
- "type": "number"
+ "type": "integer"
},
"password": {
"type": "string"
},
"twelveHourFormat": {
"type": "boolean"
- }
+ },
+ "attributes": {}
}
},
"Server": {
"properties": {
"id": {
- "type": "number"
+ "type": "integer"
},
"registration": {
"type": "boolean"
@@ -767,7 +1231,7 @@
"type": "number"
},
"zoom": {
- "type": "number"
+ "type": "integer"
},
"twelveHourFormat": {
"type": "boolean"
@@ -775,12 +1239,20 @@
}
},
"Command": {
- "properties": {}
+ "properties": {
+ "deviceId": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "attributes": {}
+ }
},
"Device": {
"properties": {
"id": {
- "type": "number"
+ "type": "integer"
},
"name": {
"type": "string"
@@ -795,45 +1267,138 @@
"type": "string"
},
"positionId": {
- "type": "number"
+ "type": "integer"
},
"groupId": {
- "type": "number"
- }
+ "type": "integer"
+ },
+ "geofenceIds": {},
+ "attributes": {}
}
},
"Group": {
"properties": {
"id": {
- "type": "number"
+ "type": "integer"
},
"name": {
"type": "string"
},
"groupId": {
- "type": "number"
+ "type": "integer"
}
}
},
"DevicePermission": {
"properties": {
"userId": {
- "type": "number"
+ "type": "integer"
},
"deviceId": {
- "type": "number"
+ "type": "integer"
}
}
},
"GroupPermission": {
"properties": {
"userId": {
- "type": "number"
+ "type": "integer"
},
"groupId": {
- "type": "number"
+ "type": "integer"
+ }
+ }
+ },
+ "GeofencePermission": {
+ "properties": {
+ "userId": {
+ "type": "integer"
+ },
+ "geofenceId": {
+ "type": "integer"
+ }
+ }
+ },
+ "GroupGeofence": {
+ "properties": {
+ "groupId": {
+ "type": "integer"
+ },
+ "geofenceId": {
+ "type": "integer"
+ }
+ }
+ },
+ "DeviceGeofence": {
+ "properties": {
+ "deviceId": {
+ "type": "integer"
+ },
+ "geofenceId": {
+ "type": "integer"
+ }
+ }
+ },
+ "CommandType": {
+ "properties": {
+ "type": {
+ "type": "string"
}
}
+ },
+ "Geofence": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "area": {
+ "type": "string"
+ },
+ "attributes": {}
+ }
+ },
+ "Notification": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "userId": {
+ "type": "integer"
+ },
+ "attributes": {}
+ }
+ },
+ "Event": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "serverTime": {
+ "type": "string"
+ },
+ "deviceId": {
+ "type": "integer"
+ },
+ "positionId": {
+ "type": "integer"
+ },
+ "geofenceId": {
+ "type": "integer"
+ },
+ "attributes": {}
+ }
}
}
-}
+} \ No newline at end of file