I am trying to make code to store historic data, in case my network connection have been down, I want the attribute values collected during the network downtime, to be sent to the serer once the network connection is restored.
I read the documentation here:
and there are a method mentioned where I should use the endpoint
/api/master/asset/{assetID}/attribute/{attributeName}/{timestamp}
BUT if I do etc.
/api/master/asset/5NjH8Zl2d36EuqCItcjwJ5/attribute/temperature/1746284228
I get an error 404 NOT found
If I remove the timestamp and do like this
/api/master/asset/5NjH8Zl2d36EuqCItcjwJ5/attribute/temperature/
I get an error 406 Not acceptable
I also tried the solution mentioned here:
And then add json body like this
[
{
“ref”: {
“id”: “5NjH8Zl2d36EuqCItcjwJ5”,
“name”: “temperature”,
“timestamp”: 1746284228
},
“value”: 25
}
]
I had the same need when that functionality was not yet possible in OR. Now, I can’t use it either, but that’s another story. So I wrote my code to allow direct writing to PostgreSQL from OR, it’s always good to have a plan B!