- User with role user must be signed in
- Endpoint must be called with token
- Name of User with the role iot must be unique <<<<<<< HEAD
=======
85e1999 (Update README.md) `{
"name":"meteo1",
"password":"123456"
}`
<<<<<<< HEAD
=======
85e1999 (Update README.md) `{
"name":"meteo1",
"password":"123456"
}`
User with role user must be signed inEndpoint must be called with tokenBE checks if the endpoint is called by a user who is related (owner) to a certain IoT
{ "id": 12 }
- All IoTs in DB are sent back
- IN PROGRESS
ONLY user with role IOT { "value":11, "type":"temperature", "location": "Pv", "date": "2023-04-01 09:40:45" }
- Returns back last mesuered data in DB
{ "statusCode": 200, "message": "OK", "data": { "location": "Pv", "temperature": 10, "dateTemp": "2023-04-01T07:40:45.000Z", "humidity": 10, "dateHum": "2023-04-01T07:40:45.000Z" } }
N/A
Param | Type | Description | Sample |
---|---|---|---|
type | string | temperature, humidity | temperature, humidity |
userId | number | id of iot user in DB | 1 |
startDate | Date | start of interval | 2023-04-02T17:25:41.000Z |
endDate | Date | end of interval | 2023-04-05T17:25:41.000Z |
granularity | number | granularity | 5 |
granularityUnit | string | time unit | minutes, hours, days |
http://localhost:3333/iot/data/getMany?type=temperature,humidity&userId=1&startDate=2023-04-04T18%3A14%3A12%2B02%3A00&endDate=2023-04-06T18%3A14%3A12%2B02%3A00&granularity=10&granularityUnit=minutes