135 lines
4.4 KiB
JSON
135 lines
4.4 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "This is a gateway API for IoT data.",
|
|
"title": "Gateway API",
|
|
"contact": {},
|
|
"version": "1.0"
|
|
},
|
|
"host": "doc.db.e.kb28.ch",
|
|
"basePath": "/api/v1",
|
|
"paths": {
|
|
"/rooms": {
|
|
"get": {
|
|
"description": "Get a list of all unique rooms from the measurement",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"rooms"
|
|
],
|
|
"summary": "Get all unique rooms",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rooms/{room-id}/current": {
|
|
"get": {
|
|
"description": "Get the latest record for a specific room",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"rooms"
|
|
],
|
|
"summary": "Get current data for a room",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Room ID",
|
|
"name": "room-id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rooms/{room-id}/history": {
|
|
"get": {
|
|
"description": "Get history for a specific room",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"rooms"
|
|
],
|
|
"summary": "Get history for a room",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Room ID",
|
|
"name": "room-id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |