|
- {
- "openapi": "3.0.0",
- "info": {
- "title": "RES LEVIS API",
- "description": "API for RES LEVIS project",
- "contact": {
- "email": "info@reslevis.com"
- },
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- },
- "version": "1.0.2"
- },
- "servers": [
- {
- "url": "https://virtserver.swaggerhub.com/maestry/RESLEVIS/1.0.2",
- "description": "SwaggerHub API Auto Mocking"
- },
- {
- "url": "https://virtserver.swaggerhub.com/reslevis/reslevis/1.0.1",
- "description": "RES LEVIS API"
- }
- ],
- "tags": [
- {
- "name": "Admins",
- "description": "Secured Admin-only calls"
- },
- {
- "name": "Developers",
- "description": "Operations available to regular developers"
- }
- ],
- "paths": {
- "/getBuildings": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the buildings",
- "description": "Get the buildings\n",
- "operationId": "getBuildings",
- "parameters": [
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/BuildingItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postBuilding": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a building item",
- "description": "Post a building",
- "operationId": "postBuilding",
- "requestBody": {
- "description": "plan item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BuildingItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getPlans": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the plans",
- "description": "Get the plans\n",
- "operationId": "getPlans",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the plans",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/PlanItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postPlan": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a plan item",
- "description": "Post a plan",
- "operationId": "postPlan",
- "requestBody": {
- "description": "plan item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/PlanItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getZones": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the zones",
- "description": "Get the zones\n",
- "operationId": "getZones",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the zones",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ZoneItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postZone": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a zone item",
- "description": "Post a zone item",
- "operationId": "postZone",
- "requestBody": {
- "description": "zone item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ZoneItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getGateways": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the gateways",
- "description": "Get the gateways\n",
- "operationId": "getGateways",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the gateways",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/GatewayItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postGateway": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a gateway item",
- "description": "Post a gateway item",
- "operationId": "postGateway",
- "requestBody": {
- "description": "gateway item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GatewayItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getTrackers": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the trackers",
- "description": "Get the trackers\n",
- "operationId": "getTrackers",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the trackers",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/TrackerItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postTracker": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a tracker item",
- "description": "Post a tracker item",
- "operationId": "postTracker",
- "requestBody": {
- "description": "tracker item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/TrackerItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getOperators": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the operators",
- "description": "Get the operators\n",
- "operationId": "getOperators",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the operators",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/OperatorItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postOperator": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post an operator item",
- "description": "Post an operator item",
- "operationId": "postOperator",
- "requestBody": {
- "description": "operator item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OperatorItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getSubjects": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the subjects",
- "description": "Get the subjects\n",
- "operationId": "getSubjects",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the subjects",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/SubjectItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postSubject": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a subject item",
- "description": "Post a subject",
- "operationId": "postSubject",
- "requestBody": {
- "description": "subject item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SubjectItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getAlarms": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the alarms",
- "description": "Get the alarms\n",
- "operationId": "getAlarms",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "building of the alarms",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/AlarmItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postAlarm": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post an alarm",
- "description": "Post an alarm",
- "operationId": "postAlarm",
- "requestBody": {
- "description": "alarm item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AlarmItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/getTracks": {
- "get": {
- "tags": [
- "Developers"
- ],
- "summary": "Get the tracks",
- "description": "Get the tracks\n",
- "operationId": "getTracks",
- "parameters": [
- {
- "name": "building",
- "in": "query",
- "description": "site of the tracks",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "searchString",
- "in": "query",
- "description": "pass an optional search string for looking up inventory",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "skip",
- "in": "query",
- "description": "number of records to skip for pagination",
- "required": false,
- "schema": {
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "maximum number of records to return",
- "required": false,
- "schema": {
- "maximum": 1000,
- "minimum": 0,
- "type": "integer",
- "format": "int32"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "search results matching criteria",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/TrackItem"
- }
- }
- }
- }
- },
- "400": {
- "description": "bad input parameter"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- },
- "/postTrack": {
- "post": {
- "tags": [
- "Developers"
- ],
- "summary": "Post a track",
- "description": "Post a track",
- "operationId": "postTrack",
- "requestBody": {
- "description": "track item",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/TrackItem"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "item created"
- },
- "400": {
- "description": "invalid input, object invalid"
- },
- "409": {
- "description": "an existing item already exists"
- }
- }
- },
- "servers": [
- {
- "url": "",
- "description": ""
- }
- ]
- }
- },
- "components": {
- "schemas": {
- "BuildingItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "name": {
- "type": "string",
- "example": "Hospital"
- },
- "city": {
- "type": "string"
- },
- "address": {
- "type": "string"
- },
- "latitude": {
- "type": "number"
- },
- "longitude": {
- "type": "number"
- }
- },
- "description": "A building or an area that groups together several plan"
- },
- "PlanItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "name": {
- "type": "string",
- "example": "Building 1 - Floor 1"
- },
- "image": {
- "type": "string",
- "format": "uri",
- "example": "The URL of the image"
- },
- "scale": {
- "type": "number",
- "example": 1
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "A plan is floor or an external space of a building"
- },
- "ZoneItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "name": {
- "type": "string",
- "example": "Floor 1 - Room 1"
- },
- "groups": {
- "type": "string"
- },
- "plan": {
- "type": "string",
- "format": "uuid"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "A zone is a room or a sub-area of a plan"
- },
- "GatewayItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "name": {
- "type": "string"
- },
- "mac": {
- "type": "string"
- },
- "status": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "ip": {
- "type": "string"
- },
- "position": {
- "type": "string"
- },
- "x": {
- "type": "number"
- },
- "y": {
- "type": "number"
- },
- "notes": {
- "type": "string"
- },
- "zone": {
- "type": "string",
- "format": "uuid"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "A gateway of the system"
- },
- "TrackerItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "name": {
- "type": "string"
- },
- "mac": {
- "type": "string"
- },
- "status": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "position": {
- "type": "string"
- },
- "notes": {
- "type": "string"
- },
- "x": {
- "type": "number"
- },
- "y": {
- "type": "number"
- },
- "zone": {
- "type": "string",
- "format": "uuid"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "A tracker of the system"
- },
- "OperatorItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "phone": {
- "type": "string"
- },
- "zones": {
- "type": "string"
- },
- "groups": {
- "type": "string"
- },
- "notes": {
- "type": "string"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "An operator who monitors the subjects"
- },
- "SubjectItem": {
- "required": [
- "id",
- "name"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "role": {
- "type": "string"
- },
- "phone": {
- "type": "string"
- },
- "zones": {
- "type": "string"
- },
- "groups": {
- "type": "string"
- },
- "notes": {
- "type": "string"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "Person or object monitored by the operators"
- },
- "AlarmItem": {
- "required": [
- "id"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "time"
- },
- "type": {
- "type": "string"
- },
- "status": {
- "type": "string"
- },
- "gateway": {
- "type": "string",
- "format": "uuid"
- },
- "gatewayMac": {
- "type": "string"
- },
- "tracker": {
- "type": "string",
- "format": "uuid"
- },
- "trackerBid": {
- "type": "string"
- },
- "subject": {
- "type": "string",
- "format": "uuid"
- },
- "subjectName": {
- "type": "string"
- },
- "operator": {
- "type": "string",
- "format": "uuid"
- },
- "operatorName": {
- "type": "string"
- },
- "zone": {
- "type": "string",
- "format": "uuid"
- },
- "zoneName": {
- "type": "string"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "Alarm triggered if a monitored subject is lost or out of their zone"
- },
- "TrackItem": {
- "required": [
- "id"
- ],
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "time"
- },
- "type": {
- "type": "string"
- },
- "status": {
- "type": "string"
- },
- "gateway": {
- "type": "string",
- "format": "uuid"
- },
- "gatewayMac": {
- "type": "string"
- },
- "tracker": {
- "type": "string",
- "format": "uuid"
- },
- "trackerMac": {
- "type": "string"
- },
- "subject": {
- "type": "string"
- },
- "subjectName": {
- "type": "string"
- },
- "zone": {
- "type": "string"
- },
- "zoneName": {
- "type": "string"
- },
- "signal": {
- "type": "number"
- },
- "building": {
- "type": "string",
- "format": "uuid"
- }
- },
- "description": "Log of a state change of a tracker with respect to a gateway"
- }
- }
- }
- }
|