FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
03-12-2021 10:59 AM
With an REST Client (for example Postman or YARC) I can communicate with the datalayer.
Is it also possible to make an app that consumes a REST API? (the other way around)
Is there any sample available?
Solved! Go to Solution.
03-12-2021 01:15 PM
Each node that is available in the ctrlX Data Layer can "consume" REST calls. So please have a look in the SDK for ctrlX AUTOMATION to see in the example "datalayer.register.node" how to add own nodes.
03-12-2021 01:49 PM
Hello LeonParidaans,
you could also use our Node-RED App, which is running on the ctrlX CORE and this is basically a REST Client.
To connect to another Datalayer from another ctrlX you can do a remote Datalayer connection, this makes the remote Datalayer available in your local.
Regards
03-15-2021 11:33 AM
But is it also possible to consume REST calls from 3th party application (for example a SQL server) in the Core?
03-15-2021 11:40 AM - edited 03-15-2021 11:42 AM
Yes of course, but then you have to know the exact address (IP and port or so on)of your backend you'ld like to reach and be beware of security issues when opening new communication ways into the ctrlX CORE.
And the other way when using the REST API the requests can of course be sent from each client you like.
03-15-2021 11:41 AM
Consuming a REST call would mean you build in your app your own webserver, this you can do, we have an example for that in our sdk.
Making a REST call to some other server would be a REST client, you can also do that, you could for example include curl in your app, we do not have an example for this. https://github.com/curl/curl
So every way is possible.