mycorerepository/swagger.json

4652 lines
108 KiB
JSON

{
"x-generator": "NSwag v13.9.2.0 (NJsonSchema v10.3.1.0 (Newtonsoft.Json v12.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "MyCore Service",
"description": "API description",
"version": "Version Pre-Alpha"
},
"servers": [
{
"url": "http://localhost:25049"
}
],
"paths": {
"/api/books": {
"get": {
"tags": [
"Books"
],
"operationId": "Books_GetAll",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Book"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"post": {
"tags": [
"Books"
],
"operationId": "Books_Create",
"requestBody": {
"x-name": "book",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/books/{id}": {
"get": {
"tags": [
"Books"
],
"operationId": "Books_Get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"Books"
],
"operationId": "Books_Update",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"requestBody": {
"x-name": "bookIn",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
},
"required": true,
"x-position": 2
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"delete": {
"tags": [
"Books"
],
"operationId": "Books_Delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/{userId}": {
"get": {
"tags": [
"Device"
],
"summary": "Get all devices summary",
"operationId": "Device_GetAll",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeviceSummaryDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/detail/{deviceId}": {
"get": {
"tags": [
"Device"
],
"summary": "Get a specific device info",
"operationId": "Device_GetDetail",
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"description": "id of device",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/{userId}/type/{type}": {
"get": {
"tags": [
"Device"
],
"summary": "Get list of devices from a type",
"operationId": "Device_GetDevicesByType",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "user Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "type",
"in": "path",
"required": true,
"description": "device type",
"schema": {
"$ref": "#/components/schemas/DeviceType"
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device": {
"post": {
"tags": [
"Device"
],
"summary": "Create a device",
"operationId": "Device_Create",
"requestBody": {
"x-name": "deviceDetailDTO",
"description": "Device to create",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/{userId}/fromProvider/{providerId}": {
"post": {
"tags": [
"Device"
],
"summary": "Create devices from provider",
"operationId": "Device_CreateDevicesFromProvider",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "User Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "providerId",
"in": "path",
"required": true,
"description": "Id of Provider",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"get": {
"tags": [
"Device"
],
"summary": "Get devices from provider",
"operationId": "Device_GetDevicesFromProvider",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "User Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "providerId",
"in": "path",
"required": true,
"description": "Id of Provider",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"delete": {
"tags": [
"Device"
],
"summary": "Delete devices from provider",
"operationId": "Device_DeleteDevicesFromProvider",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "User Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "providerId",
"in": "path",
"required": true,
"description": "Id of Provider",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/zigbee2Mqtt/{userId}": {
"get": {
"tags": [
"Device"
],
"summary": "Get all zigbee2Mqtt devices",
"operationId": "Device_GetDevicesFromZigbee2Mqtt",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "User Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/{deviceId}": {
"put": {
"tags": [
"Device"
],
"summary": "Update a device",
"operationId": "Device_Update",
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-position": 2
}
],
"requestBody": {
"x-name": "deviceDetailDTO",
"description": "Device to update",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"delete": {
"tags": [
"Device"
],
"summary": "Delete a device",
"operationId": "Device_Delete",
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"description": "Id of device to delete",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/user/{userId}": {
"delete": {
"tags": [
"Device"
],
"summary": "Delete all device for a specified",
"operationId": "Device_DeleteAllForUser",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/energy/electricity": {
"get": {
"tags": [
"Energy"
],
"summary": "Get summary production of Kwh/Year",
"operationId": "Energy_GetElectricityProduction",
"parameters": [
{
"name": "userId",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "viewBy",
"in": "query",
"schema": {
"$ref": "#/components/schemas/ViewBy"
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ElectricityProduction"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/iot/smartprinter/{idDevice}": {
"get": {
"tags": [
"IOT"
],
"summary": "Retrieve all SmartPrinterMessage",
"operationId": "IOT_GetSmartPrinterMessages",
"parameters": [
{
"name": "id",
"in": "query",
"description": "Id of the smart printer message",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
},
{
"name": "idDevice",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SmartPrinterMessage"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"post": {
"tags": [
"IOT"
],
"summary": "It's the method to post data from mqtt broker to Database (Thanks Rpi!)",
"operationId": "IOT_PostToDBPrinter",
"parameters": [
{
"name": "idDevice",
"in": "path",
"required": true,
"description": "Id of the device to upload to DB",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"requestBody": {
"x-name": "content",
"description": "Content that will be uploaded",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SmartPrinterMessage"
}
}
}
},
"required": true,
"x-position": 2
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/iot/smartgarden/{idDevice}": {
"post": {
"tags": [
"IOT"
],
"summary": "It's the method to post data from mqtt broker to Database (Thanks Rpi!)",
"operationId": "IOT_PostToDBSmartGarden",
"parameters": [
{
"name": "idDevice",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"requestBody": {
"x-name": "content",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SmartGardenMessage"
}
}
}
},
"required": true,
"x-position": 2
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/odd/country/{id}/{oddRequest}": {
"get": {
"tags": [
"Odd"
],
"summary": "Get odds for one country and one odd value maximum",
"operationId": "Odd_GetForCountry",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "id of country, e.g = BE for Belgium",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "oddRequest",
"in": "path",
"required": true,
"description": "Odd Maximum value",
"schema": {
"type": "number",
"format": "double"
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OddNice"
}
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/odd/{oddRequest}": {
"get": {
"tags": [
"Odd"
],
"summary": "Get odds for one country and one odd value maximum",
"operationId": "Odd_GetAll",
"parameters": [
{
"name": "oddRequest",
"in": "path",
"required": true,
"description": "Odd Maximum value",
"schema": {
"type": "number",
"format": "double"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OddNice"
}
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/provider/{userId}": {
"get": {
"tags": [
"Provider"
],
"summary": "Get all user providers ",
"operationId": "Provider_GetAll",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProviderDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/provider": {
"post": {
"tags": [
"Provider"
],
"summary": "Create a provider",
"operationId": "Provider_Create",
"requestBody": {
"x-name": "providerDTO",
"description": "Provider to create",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"Provider"
],
"summary": "Update a provider",
"operationId": "Provider_Update",
"requestBody": {
"x-name": "providerDTO",
"description": "Provider to update",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/provider/{providerId}": {
"delete": {
"tags": [
"Provider"
],
"summary": "Delete a provider",
"operationId": "Provider_Delete",
"parameters": [
{
"name": "providerId",
"in": "path",
"required": true,
"description": "Id of provider to delete",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/screen": {
"get": {
"tags": [
"ScreenDevice"
],
"operationId": "ScreenDevice_GetAllScreenDevices",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScreenDevice"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"post": {
"tags": [
"ScreenDevice"
],
"operationId": "ScreenDevice_CreateDevice",
"requestBody": {
"x-name": "screenDevice",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScreenDevice"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/screen/{screenDeviceId}": {
"get": {
"tags": [
"ScreenDevice"
],
"operationId": "ScreenDevice_GetDeviceInfo",
"parameters": [
{
"name": "screenDeviceId",
"in": "path",
"required": true,
"description": "Id of the screen device you want to get information",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScreenDevice"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"ScreenDevice"
],
"operationId": "ScreenDevice_UpdateDevice",
"parameters": [
{
"name": "screenDeviceId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"requestBody": {
"x-name": "screenDevice",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScreenDevice"
}
}
},
"required": true,
"x-position": 2
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/device/screen/{deviceId}": {
"delete": {
"tags": [
"ScreenDevice"
],
"operationId": "ScreenDevice_DeleteDevice",
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/mqtt": {
"post": {
"tags": [
"MQTT"
],
"summary": "Publish mqtt test",
"operationId": "MQTT_PublishMessage",
"requestBody": {
"x-name": "mqttMessageDTO",
"description": "Message to send",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MqttMessageDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "boolean"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/layout/panelSection": {
"get": {
"tags": [
"Layout"
],
"summary": "It's a test ! :) ",
"operationId": "Layout_Get",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PanelSection"
}
}
}
}
}
}
}
},
"/api/token": {
"post": {
"tags": [
"Token"
],
"operationId": "Token_ConnectUser",
"requestBody": {
"x-name": "loginDTO",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfo"
}
}
}
}
}
}
},
"/api/user": {
"get": {
"tags": [
"User"
],
"summary": "Get a list of user ",
"operationId": "User_GetAll",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserInfo"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"post": {
"tags": [
"User"
],
"operationId": "User_CreateUser",
"requestBody": {
"x-name": "newUser",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfo"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoDetailDTO"
}
}
}
}
}
},
"put": {
"tags": [
"User"
],
"operationId": "User_UpdateUser",
"requestBody": {
"x-name": "updatedUser",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfo"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/user/{id}": {
"get": {
"tags": [
"User"
],
"summary": "Get a specific user ",
"operationId": "User_Get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "id user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"delete": {
"tags": [
"User"
],
"operationId": "User_DeleteUser",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/test": {
"get": {
"tags": [
"Values"
],
"summary": "It's a test ! :) ",
"operationId": "Values_GetAll",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"post": {
"tags": [
"Values"
],
"operationId": "Values_Post",
"requestBody": {
"x-name": "value",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/test/{id}": {
"get": {
"tags": [
"Values"
],
"operationId": "Values_Get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"Values"
],
"operationId": "Values_Put",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"requestBody": {
"x-name": "value",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"required": true,
"x-position": 2
},
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"bearer": []
}
]
},
"delete": {
"tags": [
"Values"
],
"operationId": "Values_Delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/Authentication/Token": {
"post": {
"tags": [
"Authentication"
],
"summary": "Authenticate with form parameters (used by Swagger test client)",
"operationId": "Authentication_AuthenticateWithForm",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"grant_type": {
"type": "string",
"nullable": true
},
"username": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
},
"client_id": {
"type": "string",
"nullable": true
},
"client_secret": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenDTO"
}
}
}
},
"401": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/Authentication/Authenticate": {
"post": {
"tags": [
"Authentication"
],
"summary": "Authenticate with Json parameters (used by most clients)",
"operationId": "Authentication_AuthenticateWithJson",
"requestBody": {
"x-name": "login",
"description": "Login DTO",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginDTO"
}
}
}
},
"401": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/automation/{userId}": {
"get": {
"tags": [
"Automation"
],
"summary": "Get all automations for the specified user",
"operationId": "Automation_GetAll",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RoomSummaryDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/automation/detail/{automationId}": {
"get": {
"tags": [
"Automation"
],
"summary": "Get detail info of a specified automation",
"operationId": "Automation_GetDetail",
"parameters": [
{
"name": "automationId",
"in": "path",
"required": true,
"description": "automation id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutomationDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/automation": {
"post": {
"tags": [
"Automation"
],
"operationId": "Automation_Create",
"requestBody": {
"x-name": "automationCreateOrUpdateDetail",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutomationCreateOrUpdateDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutomationDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"Automation"
],
"summary": "Update an automation",
"operationId": "Automation_Update",
"requestBody": {
"x-name": "automationCreateOrUpdateDetail",
"description": "automation to update",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutomationCreateOrUpdateDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AutomationCreateOrUpdateDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/automation/{automationId}": {
"delete": {
"tags": [
"Automation"
],
"summary": "Delete an automation",
"operationId": "Automation_Delete",
"parameters": [
{
"name": "automationId",
"in": "path",
"required": true,
"description": "Id of automation to delete",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/automation/user/{userId}": {
"delete": {
"tags": [
"Automation"
],
"summary": "Delete all automation for a specified",
"operationId": "Automation_DeleteAllForUser",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/{userId}": {
"get": {
"tags": [
"Group"
],
"summary": "Get all groups for the specified user",
"operationId": "Group_GetAll",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupSummaryDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/detail/{groupId}": {
"get": {
"tags": [
"Group"
],
"summary": "Get detail info of a specified group",
"operationId": "Group_GetDetail",
"parameters": [
{
"name": "userId",
"in": "query",
"description": "user id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "groupId",
"in": "path",
"required": true,
"description": "groupid",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GroupDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/{userId}/type/{type}": {
"get": {
"tags": [
"Group"
],
"summary": "Get list of group from a type",
"operationId": "Group_GetGroupsByType",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "user Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "type",
"in": "path",
"required": true,
"description": "group type",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupSummaryDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group": {
"post": {
"tags": [
"Group"
],
"summary": "Create a group",
"operationId": "Group_Create",
"requestBody": {
"x-name": "groupCreateOrUpdateDetail",
"description": "Group to create",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GroupCreateOrUpdateDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GroupDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"Group"
],
"summary": "Update a group",
"operationId": "Group_Update",
"requestBody": {
"x-name": "groupCreateOrUpdateDetail",
"description": "group to update",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GroupCreateOrUpdateDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GroupCreateOrUpdateDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/{userId}/fromZigbee": {
"post": {
"tags": [
"Group"
],
"summary": "Create groups from provider",
"operationId": "Group_CreateDevicesFromZigbee2Mqtt",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "User Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupDetailDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/{groupId}/device/{deviceId}": {
"delete": {
"tags": [
"Group"
],
"summary": "Delete device from a group",
"operationId": "Group_Delete",
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"description": "Id of device to delete from the group",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "groupId",
"in": "path",
"required": true,
"description": "Id of group ",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/{groupId}": {
"delete": {
"tags": [
"Group"
],
"summary": "Delete a group",
"operationId": "Group_Delete2",
"parameters": [
{
"name": "groupId",
"in": "path",
"required": true,
"description": "Id of group ",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/zigbee2Mqtt/{userId}": {
"get": {
"tags": [
"Group"
],
"summary": "Get all zigbee2Mqtt groups",
"operationId": "Group_GetGroupsFromZigbee2Mqtt",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "User Id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GroupDetailDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/group/user/{userId}": {
"delete": {
"tags": [
"Group"
],
"summary": "Delete all group for a specified",
"operationId": "Group_DeleteAllForUser",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/room/{userId}": {
"get": {
"tags": [
"Room"
],
"summary": "Get all rooms for the specified user",
"operationId": "Room_GetAll",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RoomSummaryDTO"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/room/detail/{roomId}": {
"get": {
"tags": [
"Room"
],
"summary": "Get detail info of a specified room",
"operationId": "Room_GetDetail",
"parameters": [
{
"name": "userId",
"in": "query",
"description": "user id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "roomId",
"in": "path",
"required": true,
"description": "room id",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoomDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/room": {
"post": {
"tags": [
"Room"
],
"summary": "Create a room",
"operationId": "Room_Create",
"requestBody": {
"x-name": "roomCreateOrUpdateDetail",
"description": "Room to create",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoomCreateOrUpdateDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoomDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
},
"put": {
"tags": [
"Room"
],
"summary": "Update a room",
"operationId": "Room_Update",
"requestBody": {
"x-name": "roomCreateOrUpdateDetail",
"description": "room to update",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoomCreateOrUpdateDetailDTO"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoomCreateOrUpdateDetailDTO"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/room/{roomId}/device/{deviceId}": {
"delete": {
"tags": [
"Room"
],
"summary": "Delete device from a room",
"operationId": "Room_Delete",
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"description": "Id of device to delete from the room",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "roomId",
"in": "path",
"required": true,
"description": "Id of room ",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/room/{roomId}": {
"delete": {
"tags": [
"Room"
],
"summary": "Delete a room",
"operationId": "Room_Delete2",
"parameters": [
{
"name": "roomId",
"in": "path",
"required": true,
"description": "Id of room ",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/api/room/user/{userId}": {
"delete": {
"tags": [
"Room"
],
"summary": "Delete all room for a specified",
"operationId": "Room_DeleteAllForUser",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"description": "Id of user",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
"security": [
{
"bearer": []
}
]
}
},
"/azure": {
"post": {
"tags": [
"Azure"
],
"operationId": "Azure_Create",
"requestBody": {
"x-name": "user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AzureADAuthModel"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/facebook": {
"post": {
"tags": [
"Facebook"
],
"operationId": "Facebook_Create",
"requestBody": {
"x-name": "user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FacebookAuthModel"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/google": {
"post": {
"tags": [
"Google"
],
"operationId": "Google_Create",
"requestBody": {
"x-name": "user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GoogleAuthModel"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/token": {
"post": {
"tags": [
"Token"
],
"operationId": "Token_Create",
"requestBody": {
"x-name": "user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/twitter": {
"post": {
"tags": [
"Twitter"
],
"operationId": "Twitter_Create",
"requestBody": {
"x-name": "user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TwitterAuthModel"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Book": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"bookName": {
"type": "string",
"nullable": true
},
"price": {
"type": "number",
"format": "decimal"
},
"category": {
"type": "string",
"nullable": true
},
"author": {
"type": "string",
"nullable": true
}
}
},
"DeviceSummaryDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"model": {
"type": "string",
"nullable": true
},
"type": {
"$ref": "#/components/schemas/DeviceType"
},
"status": {
"type": "boolean"
},
"connectionStatus": {
"$ref": "#/components/schemas/ConnectionStatus"
},
"locationId": {
"type": "string",
"nullable": true
},
"providerId": {
"type": "string",
"nullable": true
},
"providerName": {
"type": "string",
"nullable": true
},
"location": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/LocationDTO"
}
]
},
"lastStateDate": {
"type": "string",
"format": "date-time"
},
"battery": {
"type": "boolean"
},
"batteryStatus": {
"type": "integer",
"format": "int32"
}
}
},
"DeviceType": {
"type": "string",
"description": "",
"x-enumNames": [
"Sensor",
"Actuator",
"Camera",
"Switch",
"Light",
"Sound",
"Plug",
"Multiplug",
"Thermostat",
"Valve",
"Door",
"Environment",
"Motion",
"Gateway",
"Unknown"
],
"enum": [
"Sensor",
"Actuator",
"Camera",
"Switch",
"Light",
"Sound",
"Plug",
"Multiplug",
"Thermostat",
"Valve",
"Door",
"Environment",
"Motion",
"Gateway",
"Unknown"
]
},
"ConnectionStatus": {
"type": "string",
"description": "",
"x-enumNames": [
"Connected",
"Disconnected",
"Unknown"
],
"enum": [
"Connected",
"Disconnected",
"Unknown"
]
},
"LocationDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
}
}
},
"DeviceDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/DeviceSummaryDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"firmwareVersion": {
"type": "string",
"nullable": true
},
"hardwareVersion": {
"type": "string",
"nullable": true
},
"port": {
"type": "integer",
"format": "int32"
},
"meansOfCommunications": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/MeansOfCommunication"
}
},
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
},
"lastState": {
"type": "string",
"nullable": true
},
"ipAddress": {
"type": "string",
"nullable": true
},
"serviceIdentification": {
"type": "string",
"nullable": true
},
"manufacturerName": {
"type": "string",
"nullable": true
},
"groupIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
},
"properties": {
"type": "object",
"nullable": true,
"additionalProperties": {}
},
"supportedOperations": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
}
]
},
"MeansOfCommunication": {
"type": "string",
"description": "",
"x-enumNames": [
"Wifi",
"Bluetooth",
"Zigbee",
"Zwave"
],
"enum": [
"Wifi",
"Bluetooth",
"Zigbee",
"Zwave"
]
},
"ElectricityProduction": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"deviceId": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"watt": {
"type": "number",
"format": "double"
},
"ampere": {
"type": "number",
"format": "double"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
},
"ViewBy": {
"type": "string",
"description": "",
"x-enumNames": [
"Year",
"Month",
"Day"
],
"enum": [
"Year",
"Month",
"Day"
]
},
"SmartPrinterMessage": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"time": {
"type": "string",
"nullable": true
},
"temperature": {
"type": "number",
"format": "double"
},
"pressure": {
"type": "number",
"format": "double"
},
"smoke": {
"type": "integer",
"format": "int32"
}
}
},
"SmartGardenMessage": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"time": {
"type": "string",
"nullable": true
},
"temperature": {
"type": "number",
"format": "double"
},
"pressure": {
"type": "number",
"format": "double"
},
"humidity": {
"type": "number",
"format": "double"
},
"water": {
"type": "integer",
"format": "int32"
},
"light": {
"type": "integer",
"format": "int32"
}
}
},
"OddNice": {
"type": "object",
"additionalProperties": false,
"properties": {
"teams": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
},
"commence_time": {
"type": "integer",
"format": "int32"
},
"home_team": {
"type": "string",
"nullable": true
},
"odds": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/OddH2H"
}
]
}
}
},
"OddH2H": {
"type": "object",
"additionalProperties": false,
"properties": {
"homeOdd": {
"type": "number",
"format": "double"
},
"drawOdd": {
"type": "number",
"format": "double"
},
"visitOdd": {
"type": "number",
"format": "double"
}
}
},
"ProviderDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"endpoint": {
"type": "string",
"nullable": true
},
"username": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
},
"apiKey": {
"type": "string",
"nullable": true
},
"active": {
"type": "boolean"
}
}
},
"ScreenDevice": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"location": {
"type": "string",
"nullable": true
},
"locationExplanation": {
"type": "string",
"nullable": true
},
"height": {
"type": "integer",
"format": "int32"
},
"width": {
"type": "integer",
"format": "int32"
}
}
},
"MqttMessageDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"topic": {
"type": "string",
"nullable": true
},
"message": {
"type": "string",
"nullable": true
},
"online": {
"type": "boolean"
}
}
},
"PanelSection": {
"type": "object",
"additionalProperties": false,
"properties": {
"label": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
},
"defaultRoute": {
"type": "string",
"nullable": true
},
"children": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/PanelMenuItem"
}
}
}
},
"PanelMenuItem": {
"type": "object",
"additionalProperties": false,
"properties": {
"label": {
"type": "string",
"nullable": true
},
"route": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
},
"badgeValue": {
"type": "integer",
"format": "int32"
},
"badgeType": {
"type": "string",
"nullable": true
},
"children": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/PanelMenuItem"
}
}
}
},
"UserInfo": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"role": {
"type": "string",
"nullable": true
},
"email": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
},
"firstName": {
"type": "string",
"nullable": true
},
"lastName": {
"type": "string",
"nullable": true
},
"token": {
"type": "string",
"nullable": true
},
"birthday": {
"type": "string",
"format": "date-time"
},
"dateCreation": {
"type": "string",
"format": "date-time"
},
"address": {
"type": "string",
"nullable": true
},
"city": {
"type": "string",
"nullable": true
},
"state": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"language": {
"type": "string",
"nullable": true
},
"timeZone": {
"type": "string",
"nullable": true
},
"postalCode": {
"type": "integer",
"format": "int32"
},
"automations": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Automation"
}
},
"devices": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Device"
}
},
"providers": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Provider"
}
},
"groups": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Group"
}
},
"screenConfigurationIds": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/ScreenConfiguration"
}
},
"deviceIds": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/ScreenDevice"
}
}
}
},
"Automation": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
},
"triggers": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Trigger"
}
},
"conditions": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Condition"
}
},
"actions": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Action"
}
},
"devicesIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
},
"Trigger": {
"type": "object",
"additionalProperties": false,
"properties": {
"providerId": {
"type": "string",
"nullable": true
},
"deviceId": {
"type": "string",
"nullable": true
},
"stateName": {
"type": "string",
"nullable": true
},
"stateValue": {
"type": "string",
"nullable": true
},
"type": {
"$ref": "#/components/schemas/TriggerType"
}
}
},
"TriggerType": {
"type": "string",
"description": "",
"x-enumNames": [
"MQTT",
"WEB",
"TIME"
],
"enum": [
"MQTT",
"WEB",
"TIME"
]
},
"Condition": {
"type": "object",
"additionalProperties": false,
"properties": {
"deviceId": {
"type": "string",
"nullable": true
},
"state": {
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/State"
}
]
},
"startTime": {
"type": "string",
"nullable": true
},
"endTime": {
"type": "string",
"nullable": true
},
"type": {
"$ref": "#/components/schemas/ConditionType"
},
"value": {
"$ref": "#/components/schemas/ConditionValue"
}
}
},
"State": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"nullable": true
},
"value": {
"type": "string",
"nullable": true
}
}
},
"ConditionType": {
"type": "string",
"description": "",
"x-enumNames": [
"STATE",
"TIME"
],
"enum": [
"STATE",
"TIME"
]
},
"ConditionValue": {
"type": "string",
"description": "",
"x-enumNames": [
"EQUAL",
"NOT_EQUAL",
"BIGGER",
"BIGGEST",
"SMALLER",
"SMALLEST"
],
"enum": [
"EQUAL",
"NOT_EQUAL",
"BIGGER",
"BIGGEST",
"SMALLER",
"SMALLEST"
]
},
"Action": {
"type": "object",
"additionalProperties": false,
"properties": {
"groupId": {
"type": "string",
"nullable": true
},
"deviceId": {
"type": "string",
"nullable": true
},
"states": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/State"
}
},
"rawRequest": {
"type": "string",
"nullable": true
},
"providerId": {
"type": "string",
"nullable": true
},
"type": {
"$ref": "#/components/schemas/ActionType"
}
}
},
"ActionType": {
"type": "string",
"description": "",
"x-enumNames": [
"DELAY",
"DEVICE",
"HTTP",
"ZIGBEE2MQTT",
"MQTT",
"GROUP"
],
"enum": [
"DELAY",
"DEVICE",
"HTTP",
"ZIGBEE2MQTT",
"MQTT",
"GROUP"
]
},
"Device": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"model": {
"type": "string",
"nullable": true
},
"port": {
"type": "integer",
"format": "int32"
},
"firmwareVersion": {
"type": "string",
"nullable": true
},
"hardwareVersion": {
"type": "string",
"nullable": true
},
"status": {
"type": "boolean"
},
"type": {
"$ref": "#/components/schemas/DeviceType"
},
"connectionStatus": {
"$ref": "#/components/schemas/ConnectionStatus"
},
"locationId": {
"type": "string",
"nullable": true
},
"meansOfCommunications": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/MeansOfCommunication"
}
},
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
},
"lastState": {
"type": "string",
"nullable": true
},
"lastStateDate": {
"type": "string",
"format": "date-time"
},
"ipAddress": {
"type": "string",
"nullable": true
},
"serviceIdentification": {
"type": "string",
"nullable": true
},
"battery": {
"type": "boolean"
},
"batteryStatus": {
"type": "integer",
"format": "int32"
},
"providerId": {
"type": "string",
"nullable": true
},
"manufacturerName": {
"type": "string",
"nullable": true
},
"groupIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
},
"properties": {
"type": "object",
"nullable": true,
"additionalProperties": {}
},
"supportedOperations": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
},
"Provider": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"username": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
},
"endpoint": {
"type": "string",
"nullable": true
},
"apiKey": {
"type": "string",
"nullable": true
},
"value": {
"type": "string",
"nullable": true
},
"active": {
"type": "boolean"
}
}
},
"Group": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"serviceIdentification": {
"type": "integer",
"format": "int32"
},
"isAlarm": {
"type": "boolean"
},
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
},
"devicesIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
},
"ScreenConfiguration": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"widgets": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Widget"
}
},
"height": {
"type": "integer",
"format": "int32"
},
"width": {
"type": "integer",
"format": "int32"
}
}
},
"Widget": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"displayName": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"activated": {
"type": "boolean"
},
"form": {
"type": "string",
"nullable": true
},
"font": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
},
"size": {
"type": "string",
"nullable": true
},
"width": {
"type": "integer",
"format": "int32"
},
"height": {
"type": "integer",
"format": "int32"
},
"positionX": {
"type": "integer",
"format": "int32"
},
"positionY": {
"type": "integer",
"format": "int32"
}
}
},
"LoginDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
}
}
},
"UserInfoDetailDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"email": {
"type": "string",
"nullable": true
},
"firstName": {
"type": "string",
"nullable": true
},
"lastName": {
"type": "string",
"nullable": true
}
}
},
"TokenDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string",
"nullable": true
},
"refresh_token": {
"type": "string",
"nullable": true
},
"scope": {
"type": "string",
"nullable": true
},
"token_type": {
"type": "string",
"nullable": true
},
"expires_in": {
"type": "integer",
"format": "int32"
},
"expiration": {
"type": "string",
"format": "date-time"
}
}
},
"RoomSummaryDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
}
}
},
"AutomationDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/AutomationDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"triggers": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Trigger"
}
},
"conditions": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Condition"
}
},
"actions": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Action"
}
},
"devicesIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
}
]
},
"AutomationDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
}
}
},
"AutomationCreateOrUpdateDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/AutomationDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"triggers": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Trigger"
}
},
"conditions": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Condition"
}
},
"actions": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/Action"
}
},
"deviceIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
}
]
},
"GroupSummaryDTO": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"type": {
"type": "string",
"nullable": true
},
"isAlarm": {
"type": "boolean"
}
}
},
"GroupDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/GroupSummaryDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
},
"devices": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
]
},
"GroupCreateOrUpdateDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/GroupSummaryDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"deviceIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
}
]
},
"RoomDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/RoomSummaryDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"createdDate": {
"type": "string",
"format": "date-time"
},
"updatedDate": {
"type": "string",
"format": "date-time"
},
"devices": {
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/DeviceDetailDTO"
}
}
}
}
]
},
"RoomCreateOrUpdateDetailDTO": {
"allOf": [
{
"$ref": "#/components/schemas/RoomSummaryDTO"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"deviceIds": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
}
}
}
]
},
"AzureADAuthModel": {
"type": "object",
"additionalProperties": false,
"properties": {
"apiKey": {
"type": "string",
"nullable": true
}
}
},
"FacebookAuthModel": {
"type": "object",
"additionalProperties": false,
"properties": {
"userAccessToken": {
"type": "string",
"nullable": true
}
}
},
"GoogleAuthModel": {
"type": "object",
"additionalProperties": false,
"properties": {
"authorizationCode": {
"type": "string",
"nullable": true
},
"apiKey": {
"type": "string",
"nullable": true
}
}
},
"User": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
}
}
},
"TwitterAuthModel": {
"type": "object",
"additionalProperties": false,
"properties": {
"apiKey": {
"type": "string",
"nullable": true
}
}
}
},
"securitySchemes": {
"bearer": {
"type": "oauth2",
"description": "MyCore Authentication",
"flows": {
"password": {
"authorizationUrl": "/authentication/Token",
"tokenUrl": "/api/authentication/Token",
"scopes": {
"MyCore-api": "MyCore WebAPI"
}
}
}
}
}
},
"security": [
{
"bearer": []
}
],
"tags": [
{
"name": "Authentication",
"description": "Authentication management"
}
]
}