Logic Machine Forum
Danfoss API - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Danfoss API (/showthread.php?tid=3438)



Danfoss API - Pierre - 23.06.2021

Hello,

I'm trying to translate in lua script this curl command but this doesn't work could you can help me please.

command for connexion:

curl -X POST https://api.danfoss.com/oauth2/token -H "Authorization: Basic [mytoken]" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=client_credentials"


command query:

GET
/devices

You can query the details about operable devices, including properties and the latest status of the device.
HTTP request:
https://api.danfoss.com/ally/devices
Response Types:
200:

Thanks


RE: Danfoss API - JRP - 24.06.2021

Hello
in this post there is an example of using curl for an API called eSios. It can serve as a starting point.
https://forum.logicmachine.net/showthread.php?tid=2496&pid=22153#pid22153
Greetings