[REST API] Write to a single attribute with a timestamp

Good afternoon, I recently discovered this new endpoint,
https://demo.openremote.io/api/master/asset/:assetId/attribute/:attributeName/:timestamp
and whenever I try to use it the response on body is empty and i only received the status code 404 Not Found.

/api/master/asset/7Q82dirpItKf1xJpSejIa6/attribute/temperatura/1734972691

the assetId exists and so does the attribute, what I find strange is that even if the assetId is wrong on purpose, the error is the same and I don’t get a response in the body, only the status.

As a new endpoint, do you know if it is already in operation?

Thanks

Hey @pedro06viana ,

Make sure that the asset you are trying to use is in the same realm as the one used in your request URI. So if your asset is in the smartcity realm, make sure your request URI is /api/smartcity/asset/....

The only way that this request can return a 404, is if the asset is not found, or if the attribute is not found. One “weird” thing I see is that your attribute name is temperatura, not temperature, so ensure that you are using the true attribute name, and not the localized attribute name (something that you can check by pressing edit in the asset viewer UI).

Best of luck!

Hey @panos,

As you can see in the first image, the realm is Master and the asset belongs to the realm. The name of the attribute is written in Portuguese, which is why it is “temperatura”.

Can you see anything that I’m missing?

The confusion came from the custom asset type, which we were not aware of. :wink:
To make sure, can you click the “modify” button on the top right,
and check if the attribute name is temperatura ?

Also, as this indeed is a very new feature, (merged on December 16th, 2024)
can you verify the Docker image is of the latest version? (or redownload it)

The exact documentation on this HTTP endpoint can be found here;

Hope this helps!
And otherwise we’ll ping @panos as he worked on this haha

Thanks to reply,

Yes the attribute name is “temperatura”… I’ll check the docker image with my manager, then I’ll give more details.
Thanks