Help updating attribute with specific timestamp

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
}
]

or like this

[
{
“ref”: {
“id”: “5NjH8Zl2d36EuqCItcjwJ5”,
“name”: “temperature”
},
“value”: 25,
“timestamp”: 1746284228
}
]

No matter what I try, I get errors.

Anyopne that can help?

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!

Yeah but would rather like to have it using the API. and it seems it should be possible.

So… Anyone?

Hi!

I think the timestamp you’re using is not in milliseconds?
Using 1746284228000 might solve your issue.

I still did not get thos working.

OpenRemote manual says ISO8601 should be used, I tried timestamp in s and ms, and iso8610

I tried endpoint like

/api/realm/asset/attributes/timestamp
and
/api/realm/asset/attributes

I tried formats like

[
{
“ref”: {
“id”: “4w9DWq8oVne4c51zvbHsCf”,
“name”: “TemeStampTest”
},
“value”: 95,
“timestamp”: “2025-07-08T00:00:00Z”
}
]

And

[
{
“ref”: {
“id”: “4w9DWq8oVne4c51zvbHsCf”,
“name”: “TemeStampTest”
},
“value”: 95,
“timestamp”: 1749369600000
}
]

nothing works.

Can anyone please tell me, is it even possible to upload historic data to OpenRemote?

If I use this endpoint you already mentioned. It works for me:

Did you also try that one with the correct time in millis?

Can you use other endpoints to e.g. get info from that asset?