Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi,
I have below lua script which is calling external REST API.
local https = require("ssl.https")
local one, code, headers, status = https.request{
method = "POST",
url = "https://<ip>:<port>/<service_path>"
headers = {
["Content-Type"] = "application/json"
}
}
This script is working fine independently.
Now I want to integrate with the edge device on EMS. This script should be executed by the remote service defined on edge device in template file of lua resource in EMS.
I tried integrating the script in the lua files of thingworx. But, whenever I add the very first line "local https = require("ssl.https")", remote properties and services are not visible on Thingworx remote thing.
Can anyone guide me how to do the integration of above script in the lua service definition in template files OR is there any other way to call the external REST
Hi @aschauhan647.
Can you provide the full script so we can take a look? You can scrub any sensitive information that you would not want to reveal.
Regards.
--Sharon