---
# System prepended metadata

title: Data Log

---

# Data Log
可以將以下的資料放到api.http內使用

#@host= http://127.0.0.1:8089
@host=http://em.ljtek.pw
###取得
GET  {{host}}/datalogs HTTP/1.1

###設定
POST {{host}}/datalog HTTP/1.1
content-type: application/json

{
    "MAC":"84:CC:A8:4A:EF:60",
    "v1":22.22,
    "v2":59.21,
    "v3":291.991150,
    "v4":140.330399,
    "TEMP":31.690001,
    "HUMD":23.553711
}


### Get by id
#GET {{host}}/datalog/3 HTTP/1.1
#content-type: application/json

### Get last by mac 取得最後筆資料
GET {{host}}/datalog/last/84:CC:A8:4A:EF:6C HTTP/1.1
content-type: application/json

### Get data by mac 最後10*60筆
GET {{host}}/datalog/84:CC:A8:4A:EF:60 HTTP/1.1
content-type: application/json


