944 lines
22 KiB
JSON
944 lines
22 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "dwinzo documentation",
|
|
"description": "Description",
|
|
"version": "1.0.0"
|
|
},
|
|
"host": "185.100.212.76:5000",
|
|
"schemes": ["http"],
|
|
"tags": [
|
|
{
|
|
"name": "Authentication",
|
|
"description": "User authentication endpoints"
|
|
},
|
|
{
|
|
"name": "Camera",
|
|
"description": "Camera management endpoints"
|
|
},
|
|
{
|
|
"name": "Environment",
|
|
"description": "Environment configuration"
|
|
},
|
|
{
|
|
"name": "Floor Items",
|
|
"description": "Floor items management"
|
|
},
|
|
{
|
|
"name": "Lines",
|
|
"description": "Line drawing operations"
|
|
},
|
|
{
|
|
"name": "Walls",
|
|
"description": "Wall items management"
|
|
},
|
|
{
|
|
"name": "Zones",
|
|
"description": "Zone operations"
|
|
},
|
|
{
|
|
"name": "Users Management",
|
|
"description": "User sharing and permissions"
|
|
},
|
|
{
|
|
"name": "3D widgets",
|
|
"description": "3D widgets operations"
|
|
},
|
|
{
|
|
"name": "Panels",
|
|
"description": "Panels operations"
|
|
},
|
|
{
|
|
"name": "Floating Widgets",
|
|
"description": "Floating widgets operations"
|
|
},
|
|
{
|
|
"name": "Assets",
|
|
"description": "ModelAssets operations"
|
|
},
|
|
{
|
|
"name": "Asset Points",
|
|
"description": "Asset based structure Points"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/api/v1/signup": {
|
|
"post": {
|
|
"tags": ["Authentication"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userName": {
|
|
"example": "any"
|
|
},
|
|
"email": {
|
|
"example": "any"
|
|
},
|
|
"password": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
},
|
|
"profilePicture": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/login": {
|
|
"post": {
|
|
"tags": ["Authentication"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"example": "any"
|
|
},
|
|
"password": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"404": {
|
|
"description": "Not Found"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/setCamera": {
|
|
"post": {
|
|
"tags": ["Camera"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": {
|
|
"example": "any"
|
|
},
|
|
"position": {
|
|
"example": "any"
|
|
},
|
|
"target": {
|
|
"example": "any"
|
|
},
|
|
"rotation": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/getCamera/{organization}/{userId}": {
|
|
"get": {
|
|
"tags": ["Camera"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/activeCameras/{organization}": {
|
|
"get": {
|
|
"tags": ["Camera"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/setEvironments": {
|
|
"post": {
|
|
"tags": ["Environment"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": {
|
|
"example": "any"
|
|
},
|
|
"roofVisibility": {
|
|
"example": "any"
|
|
},
|
|
"wallVisibility": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/findEnvironments/{organization}/{userId}": {
|
|
"get": {
|
|
"tags": ["Environment"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/setfloorItems": {
|
|
"post": {
|
|
"tags": ["Floor Items"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"modelUuid": {
|
|
"example": "any"
|
|
},
|
|
"modelName": {
|
|
"example": "any"
|
|
},
|
|
"position": {
|
|
"example": "any"
|
|
},
|
|
"modelfileID": {
|
|
"example": "any"
|
|
},
|
|
"rotation": {
|
|
"example": "any"
|
|
},
|
|
"isLocked": {
|
|
"example": "any"
|
|
},
|
|
"isVisible": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/findfloorItems/{organization}": {
|
|
"get": {
|
|
"tags": ["Floor Items"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/deletefloorItem": {
|
|
"delete": {
|
|
"tags": ["Floor Items"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"modelUuid": {
|
|
"example": "any"
|
|
},
|
|
"modelName": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/setLine": {
|
|
"post": {
|
|
"tags": ["Lines"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"example": "any"
|
|
},
|
|
"layer": {
|
|
"example": "any"
|
|
},
|
|
"line": {
|
|
"example": "any"
|
|
},
|
|
"type": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/updatePoint": {
|
|
"post": {
|
|
"tags": ["Lines"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"example": "any"
|
|
},
|
|
"uuid": {
|
|
"example": "any"
|
|
},
|
|
"position": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/findLines/{organization}": {
|
|
"get": {
|
|
"tags": ["Lines"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/deleteLine": {
|
|
"delete": {
|
|
"tags": ["Lines"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"example": "any"
|
|
},
|
|
"layer": {
|
|
"example": "any"
|
|
},
|
|
"line": {
|
|
"example": "any"
|
|
},
|
|
"type": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/deletePoint": {
|
|
"delete": {
|
|
"tags": ["Lines"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"example": "any"
|
|
},
|
|
"layer": {
|
|
"example": "any"
|
|
},
|
|
"uuid": {
|
|
"example": "any"
|
|
},
|
|
"type": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/deleteLayer": {
|
|
"post": {
|
|
"tags": ["Lines"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"example": "any"
|
|
},
|
|
"layer": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/shareUser": {
|
|
"post": {
|
|
"tags": ["Users Management"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"example": "any"
|
|
},
|
|
"isShare": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"404": {
|
|
"description": "Not Found"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/findshareUsers": {
|
|
"get": {
|
|
"tags": ["Users Management"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "query",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"404": {
|
|
"description": "Not Found"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/setWallItems": {
|
|
"post": {
|
|
"tags": ["Walls"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"modelUuid": {
|
|
"example": "any"
|
|
},
|
|
"modelName": {
|
|
"example": "any"
|
|
},
|
|
"position": {
|
|
"example": "any"
|
|
},
|
|
"type": {
|
|
"example": "any"
|
|
},
|
|
"csgposition": {
|
|
"example": "any"
|
|
},
|
|
"csgscale": {
|
|
"example": "any"
|
|
},
|
|
"quaternion": {
|
|
"example": "any"
|
|
},
|
|
"scale": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/findWallItems/{organization}": {
|
|
"get": {
|
|
"tags": ["Walls"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "organization",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/deleteWallItem": {
|
|
"delete": {
|
|
"tags": ["Walls"],
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"modelUuid": {
|
|
"example": "any"
|
|
},
|
|
"modelName": {
|
|
"example": "any"
|
|
},
|
|
"organization": {
|
|
"example": "any"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/zone/save": {
|
|
"post": {
|
|
"tags": ["Zones"],
|
|
"description": "Create or update a zone",
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"organization": {
|
|
"type": "string",
|
|
"example": "NEWORG"
|
|
},
|
|
"zonesdata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"zonename": {
|
|
"type": "string",
|
|
"example": "Zone 2"
|
|
},
|
|
"zoneId": {
|
|
"type": "string",
|
|
"example": "576-65-6-659"
|
|
},
|
|
"points": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": { "type": "number" },
|
|
"y": { "type": "number" }
|
|
}
|
|
}
|
|
},
|
|
"example": [
|
|
[{ "x": 5, "y": 5 }],
|
|
[{ "x": 5, "y": 5 }],
|
|
[{ "x": 0, "y": 0 }]
|
|
]
|
|
},
|
|
"viewportPosition": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": { "type": "number" }
|
|
}
|
|
},
|
|
"example": [{ "x": 0 }]
|
|
},
|
|
"viewPortCenter": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": { "type": "number" },
|
|
"y": { "type": "number" }
|
|
}
|
|
},
|
|
"userid": {
|
|
"type": "string"
|
|
},
|
|
"layer": {
|
|
"type": "number",
|
|
"example": 1
|
|
},
|
|
"sceneID": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"zonename",
|
|
"zoneId",
|
|
"points",
|
|
"viewportPosition",
|
|
"layer"
|
|
]
|
|
}
|
|
},
|
|
"required": ["organization", "zonesdata"]
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": { "type": "string" },
|
|
"zoneData": {
|
|
"type": "object",
|
|
"properties": {
|
|
"zoneName": { "type": "string" },
|
|
"points": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": { "type": "number" },
|
|
"y": { "type": "number" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"viewPortposition": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": { "type": "number" }
|
|
}
|
|
}
|
|
},
|
|
"viewPortCenter": {
|
|
"type": "object",
|
|
"properties": {
|
|
"x": { "type": "number" },
|
|
"y": { "type": "number" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Created"
|
|
},
|
|
"404": {
|
|
"description": "Zone not updated"
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|