diff --git a/api-docs/openapi.json b/api-docs/openapi.json index b5a561c..5fc8645 100644 --- a/api-docs/openapi.json +++ b/api-docs/openapi.json @@ -156,6 +156,60 @@ } } } + }, + "/control-box": { + "get": { + "summary": "Get control box information", + "operationId": "viewBox", + "parameters": [], + "responses": { + "200": { + "description": "Control box info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Box" + } + } + } + } + } + }, + "post": { + "summary": "Change box state", + "description": "Changes box state, you need to be cof to act on this endpoint. The json do not need to contain all fields, it can be partial and only the provided values will be updated.", + "operationId": "changeBox", + "parameters": [], + "security": [ + { + "bearerAuth": [ + "exp", + "scope", + "user", + "is_cof", + "sub" + ] + } + ], + "requestBody": { + "description": "Box state", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Box" + } + } + } + }, + "responses": { + "200": { + "description": "Box state updated successfully", + "content": { + } + } + } + } } }, "components": { @@ -181,6 +235,24 @@ "format": "int8" } } + }, + "Box": { + "type": "object", + "required": [ ], + "properties": { + "pan": { + "type": "integer", + "format": "int8" + }, + "tilt": { + "type": "integer", + "format": "int8" + }, + "focus": { + "type": "integer", + "format": "int8" + } + } } }, "securitySchemes": {