swagger: "2.0" info: description: This is the swagger file that goes with our project AIOTERRA version: "1.0.0" title: AIOTERRA REST API. By default, we are using JSON format. consumes: - "application/json" produces: - "application/json" basePath: "/api" # Paths supported by the server application paths: /history: get: operationId: "plant.read_all" tags: - "History" summary: "The histroy of plant's states" description: "Read the list of plant's states" responses: 200: description: "Successful read plant state list operation" schema: type: array items: properties: Id: type: "integer" Temp: type: "number" Humidity: type: "number" Moisture: type: "number" Illumination: type: "number" Timestamp: type: "string" CO2: type: "number" X: type: "number" Z: type: "number" put: operationId: plant.write tags: - "History" summary: Add a new state in the plant state list description: Add a new state in the plant state list parameters: - name: state in: body description: state to add required: True schema: type: object properties: Temp: type: "number" Humidity: type: "number" Moisture: type: "number" Illumination: type: "number" CO2: type: "number" X: type: "number" Z: type: "number" responses: 201: description: Successfully created plant state in list /dashboard: get: operationId: "plant.read_latest" tags: - "Dashboard" summary: "The plant data structure supported by the server application" description: "Read the latest state of plant" responses: 200: description: "Successful read the latest plant state operation" schema: type: array items: properties: Id: type: "integer" Temp: type: "number" Humidity: type: "number" Moisture: type: "number" Illumination: type: "number" Timestamp: type: "string" CO2: type: "number" X: type: "number" Z: type: "number" /dashboard/status: get: operationId: "plant.read_status" tags: - "Dashboard" summary: "The plant status supported by the server application" description: "Read the status of plant" responses: 200: description: "Successful read the latest plant state operation" schema: type: array items: properties: Id: type: "integer" Temp: type: "boolean" Humidity: type: "boolean" Moisture: type: "boolean" Illumination: type: "boolean" Timestamp: type: "string" CO2: type: "boolean" X: type: "number" Z: type: "number" /image: post: operationId: plant.image_upload tags: - "Image" summary: Upload a new image description: Upload a new image parameters: - in: formData name: image type: file required: true description: upload a image file responses: 200: description: "Successfully predict type" schema: type: array items: properties: image_type: type: "integer"