aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swagger.json601
1 files changed, 583 insertions, 18 deletions
diff --git a/swagger.json b/swagger.json
index 12b5020c7..6b126ef22 100644
--- a/swagger.json
+++ b/swagger.json
@@ -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