diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-02 17:11:33 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-02 17:11:33 +1200 |
commit | 360269eb2e32f8177d3c759ccbd3a72ac8964d81 (patch) | |
tree | 181369abd4c7ced212e97dcd74536dc38aab925b /swagger.json | |
parent | 61f8fc0da6d4062db34fcfe1d9609698a0de951a (diff) | |
download | trackermap-server-360269eb2e32f8177d3c759ccbd3a72ac8964d81.tar.gz trackermap-server-360269eb2e32f8177d3c759ccbd3a72ac8964d81.tar.bz2 trackermap-server-360269eb2e32f8177d3c759ccbd3a72ac8964d81.zip |
Update swagger documentation file
Diffstat (limited to 'swagger.json')
-rw-r--r-- | swagger.json | 225 |
1 files changed, 209 insertions, 16 deletions
diff --git a/swagger.json b/swagger.json index f8269a2da..12b5020c7 100644 --- a/swagger.json +++ b/swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "3.3", + "version": "3.5", "title": "traccar" }, "host": "traccar.org", @@ -159,7 +159,180 @@ } } }, - "/permissions": { + "/groups": { + "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/Group" + } + } + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Group" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "$ref": "#/definitions/Group" + } + } + } + } + }, + "/groups/{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/Group" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "$ref": "#/definitions/Group" + } + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "description": "No Content", + "headers": {} + } + } + } + }, + "/permissions/devices": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DevicePermission" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": {}, + "schema": { + "$ref": "#/definitions/DevicePermission" + } + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DevicePermission" + } + } + ], + "responses": { + "204": { + "description": "No Content", + "headers": {} + } + } + } + }, + "/permissions/groups": { "post": { "consumes": [ "application/json" @@ -173,7 +346,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Permission" + "$ref": "#/definitions/GroupPermission" } } ], @@ -182,7 +355,7 @@ "description": "OK", "headers": {}, "schema": { - "$ref": "#/definitions/Permission" + "$ref": "#/definitions/GroupPermission" } } } @@ -200,7 +373,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Permission" + "$ref": "#/definitions/GroupPermission" } } ], @@ -556,13 +729,7 @@ "password": { "type": "string" }, - "hashedPassword": { - "type": "string" - }, - "salt": { - "type": "string" - }, - "passwordValid": { + "twelveHourFormat": { "type": "boolean" } } @@ -587,9 +754,6 @@ "mapUrl": { "type": "string" }, - "language": { - "type": "string" - }, "distanceUnit": { "type": "string" }, @@ -604,6 +768,9 @@ }, "zoom": { "type": "number" + }, + "twelveHourFormat": { + "type": "boolean" } } }, @@ -629,10 +796,26 @@ }, "positionId": { "type": "number" + }, + "groupId": { + "type": "number" + } + } + }, + "Group": { + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "groupId": { + "type": "number" } } }, - "Permission": { + "DevicePermission": { "properties": { "userId": { "type": "number" @@ -641,6 +824,16 @@ "type": "number" } } + }, + "GroupPermission": { + "properties": { + "userId": { + "type": "number" + }, + "groupId": { + "type": "number" + } + } } } } |