API Contract version V1 - adnan1975/cb-smart-ac GitHub Wiki
This Document is to show the API contract for V1 , the tool https://jsoneditoronline.org/ was used
Note: this document is out dated please check out the Swagger documentation at http://104.248.180.30/v1/api-doc/index.html
api/v1/device/measurement/add
Post
userId: mac address for the AC to authenticate the device. transactionId : unique identifier for the request.
[
{
"serialNumber": "string",
"transactionId": "string",
"temperature": 100,
"humidity": 12,
"ppm": 12,
"healthStatus": "enum150",
"deviceId" : "1"
},
{
"serialNumber": "string",
"transactionId": "string",
"temperature": 100,
"humidity": 12,
"ppm": 12,
"healthStatus": "enum150",
"deviceId" : "1"
}
]
api/v1/devices
serialNumber macAddress registrationNumber
Get
userId: logged in user. transactionId : unique identifier for the request.
[
{
"serialNumber": "string",
"transactionId": "string",
"temperature": 100,
"humidity": 12,
"ppm": 12,
"healthStatus": "enum150"
},
{
"serialNumber": "string",
"transactionId": "string",
"temperature": 100,
"humidity": 12,
"ppm": 12,
"healthStatus": "enum150"
}
]
api/v1/device/list
Get
userId: logged in user. transactionId : unique identifier for the request.
[
{
"serialNumber": "string",
"transactionId": "string",
"temperature": 100,
"humidity": 12,
"ppm": 12,
"healthStatus": "enum150"
},
{
"serialNumber": "string",
"transactionId": "string",
"temperature": 100,
"humidity": 12,
"ppm": 12,
"healthStatus": "enum150"
}
]
api/v1/user/list
Get
userId: userid for the user requesting. transactionId : unique identifier for the request.
[
{
"userId": "string",
"createdOn":"string",
"status" :"string"
},
{
"userId": "string",
"createdOn":"string",
"status" :"string"
}
]
Work in Progress
api/v1/user/login api/v1/user/logout api/v1/user/reset
Get or Post
userId: userid for the user requesting. transactionId : unique identifier for the request.