Document the API to get public device data #455
Replies: 5 comments 9 replies
-
Upvoting this. {
"historical": [
{
"21": {
"temp": 21,
"hum": 56,
"air_q": 550
},
"22": {
"temp": 22.6,
"hum": 56,
"air_q": 500
}
}
]
} 21 would be the data recollection pushed at 9 PM. But that could be a timestamp or whatever. Then you can see how the ambient data recollection evolves and represent that information on a chart. |
Beta Was this translation helpful? Give feedback.
-
That's great. So then partialInstances is an array of objects, that starts from 0 to 23 hours, representing each hour of the day? {
"0": 9.212696,
"1": 66.982833,
"2": 1011.9119531199999,
"10": 123,
"99": 1744879500
} 0: temperature And sadly it's not coming anywhere what amount of battery is left. Or at least not in this query right? There is also another thing that I do not understand: https://api.nordicsemi.world/2024-04-15/device/affirmer-lavature-salaried/jwt Why the date part has to be 2024-04-15 ? I though it could be simply yesterday. But changing that fixed date results in {"message":"Forbidden"} |
Beta Was this translation helpful? Give feedback.
-
Great thanks I will prepare an API in PHP 8.4 that can make this requests and save Thingy data in MySQL tables. That way we can set up each Nordic device with its own internal ID and then a cron each hour will recollect and store the past hour information |
Beta Was this translation helpful? Give feedback.
-
I found something a bit odd when making my device public. After one month or so it stopped being public. I didn't deactivated it... {
"@context": "https://github.com/hello-nrfcloud/proto/ProblemDetail",
"title": "Device with id affirmer-lavature-salaried not shared: not_found",
"status": 404
} So I had to start the process again which changed my old stringID to a new one. Could this be changed in the future? Other than that if someone is interested I can share my Nordic fetch-data (PHP 8.4 / Symfony 7 + Doctrine ORM will work with any DB like mysql or postgres just with some minor modifications) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The site serves the device data via a REST API (https://api.nordicsemi.world/2024-04-15/devices) which can be used by third party apps to show data. Document this and make the API stable. Right now we might change this without any notice.
Beta Was this translation helpful? Give feedback.
All reactions