Search…
⌃K
Links

HTTP GET /history (with timestamps)

Format of time-stamped data returned in response to HTTP request GET /history
The JSON data format description is provided in JSON schema format (https://json-schema.org), which provides clear human- and machine-readable documentation with examples.
The format of relayed messages is described here https://docs.ruuvi.com/communication/bluetooth-advertisements
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://ruuvi.com/schemas/ruuvi_history.schema.json",
"type": "object",
"title": "Accumulated time-stamped data from Bluetooth sensors returned in response to HTTP GET /history",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"title": "Data-object containing accumulated data from Bluetooth-sensors",
"required": [
"coordinates",
"timestamp",
"gw_mac",
"tags"
],
"properties": {
"coordinates": {
"type": "string",
"title": "GPS-coordinates of Ruuvi Gateway (optional)",
"examples": [
""
]
},
"timestamp": {
"type": "string",
"title": "Timestamp (Unix-time) when this JSON is generated by Gateway",
"examples": [
"1665742208"
]
},
"gw_mac": {
"type": "string",
"title": "MAC-address of Ruuvi Gateway",
"examples": [
"C8:25:2D:8E:9C:2C"
]
},
"tags": {
"type": "object",
"title": "Array of messages from Bluetooth-sensors",
"items": {
"type": "object",
"patternProperties": {
"^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$": {
"type": "object",
"title": "MAC-address of Bluetooth-sensor",
"required": [
"rssi",
"timestamp",
"data"
],
"properties": {
"rssi": {
"type": "integer",
"title": "RSSI",
"examples": [
-71
]
},
"timestamp": {
"type": "string",
"title": "Timestamp (Unix-time) when the message from Bluetooth-sensor was received by Gateway",
"examples": [
"1653633986"
]
},
"data": {
"type": "string",
"title": "Relayed message from Bluetooth-sensor in hex encoding",
"examples": [
"0201061BFF99040513C85714C7CC00240008041CAB76F41C3CC6A5B9E0AD06"
]
}
}
}
},
"minItems": 0,
"uniqueItems": true
},
"examples": [{
"F4:1F:0C:28:CB:D6": {
"rssi": -34,
"timestamp": "1665742208",
"data": "0201061BFF99040514EE4C08C5370018FFB803E8A7F6E67A8EF41F0C28CBD6"
},
"C6:A5:B9:E0:AD:06": {
"rssi": -33,
"timestamp": "1665742208",
"data": "0201061BFF99040514A24454C4FF0030FFFC0420AB76207A89C6A5B9E0AD06"
}
}]
}
}
}
},
"examples": [{
"data": {
"coordinates": "",
"timestamp": "1665742208",
"gw_mac": "C8:25:2D:8E:9C:2C",
"tags": {
"F4:1F:0C:28:CB:D6": {
"rssi": -34,
"timestamp": "1665742208",
"data": "0201061BFF99040514EE4C08C5370018FFB803E8A7F6E67A8EF41F0C28CBD6"
},
"C6:A5:B9:E0:AD:06": {
"rssi": -33,
"timestamp": "1665742208",
"data": "0201061BFF99040514A24454C4FF0030FFFC0420AB76207A89C6A5B9E0AD06"
}
}
}
}]
}