API , How to retrieve all resources of a device , is this possible?

Hi ,

I am trying to retrieve all the resources of a device as im hoping to make an E-Ink Dashboard Display for my devices:

I have been looking all though the documentation and was able to only show a single resource at a time using:

https://backend.thinger.io/v3/users/{user}/devices/{device_name}/resources/{input1}?authorization=“mytoken”

this works fine gets the value of my “input 1” resource .

How do i get all the resources of my device in a single request ?

but i would have to do a request of each resources

leaving the resource parameter blank (/{device_name}/resources?) seems to almost do what i want but does not show the resources values:

{“input 1”:{“al”:0,“fn”:2},“input 2”:{“al”:0,“fn”:2},“input 3”

Not sure what “al” and “fn” mean ?

Any help would be great

Thanks

Luke

Welcome!
You can make a single resource carry many variables:
thing[“control”] >> [](pson & out)
{
out[“scc_inj”] = bat_injection;
out[“scc_mvolt”] = bat_injection_mvolt;
out[“scc_tar”] = scc_target;
out[“aux_inj”] = aux_injection;
out[“aux_mvolt”] = aux_injection_mvolt;
out[“aux_tar”] = aux_target;
out[“relay1”] = relay1_value;
out[“relay2”] = relay2_value;
out[“DC1”] = high_power_buck_value;
out[“DC2”] = aux_buck_value;
};

Hi ,

Thanks for this Solution , i tested this and it works great !

also if i did kept all the resources (QTY 20) seperate and did a seperate api call for each , updated every 10mins would i run into any limits ?

Thanks again for your help

Luke

Hi,

No, in fact there are no limit into calling a device’s resources, you can call it as fast as the device can reply, the limitation is stablished by the device’s capacity.

Hi , ega

Thats great theres no limits

Thanks for your help

Luke