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.
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.
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.
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.
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.