This object is in archive! 

Get values from a Virtual enpoting in Api v2

David Gonzalez shared this question 9 years ago
Answered

Hello,


I have some Virtual endpoint and I dont have problem to set the values of each one using the API, the problem is when I try to get the values, I dont find any way on documentation to get value1,2,... of one Virtual endpoint.


Now Im using the rest api https://my.zipato.com/zipato-web/rest/meters/<ID>; and parse the Json but I thing than the new API must have a better way to get it.


Maybe Im wrong or a not able to find it? Anyone can give me some light on this?


best regards,

Replies (4)

photo
4

First get the endpoint ID :

https://my.zipato.com:443/zipato-web/v2/endpoints

You'll get an <ENDPOINT_UUID> for the device you are looking for.


Second, get the attributs (value1, 2, etc) :

https://my.zipato.com/zipato-web/v2/endpoints/<ENDPOINT_UUID>?attributes=true

You'll get the <ATTRIBUT1_UUID>, <ATTRIBUT2_UUID>, etc


Then, request the attribut value :

https://my.zipato.com:443/zipato-web/v2/attributes/<ATTRIBUT1_UUID>/value


All good :)


You can set a value by POSTing the value only at :

https://my.zipato.com:443/zipato-web/v2/attributes/<ATTRIBUT1_UUID>/value

I agree it is heavier if you request it only once, but it is lighter over time.

photo
1

Thank you a lot!

photo
1

Thanks to both authors for the question and the answer. The API documentation is quite good, yet I was pulling my hair off since this piece of information was missing.

photo
1

This was just what I needed!

Leave a Comment
 
Attach a file