Hello everyone,
i created a thing with a subscription in it. The subscription is configured with the Event DataChange and it is thrown.
The Problem is, that in the script of the description in want to make a RESTFul API call with GET.
I have the following code into the script:
var params = {
proxyScheme: undefined /* STRING */,
headers: undefined /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
useNTLM: false /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: false /* BOOLEAN */,
withCookies: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: 'http://localhost:5000' /* STRING */,
timeout: undefined /* NUMBER */,
appendHeader: undefined /* BOOLEAN */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: JSON
var result = Resources["ContentLoaderFunctions"].GetJSON(params);
logger.warn(result);
logger.warn(result.W1);
logger.warn(me.ktid.ktid);
me.coolerValue1 = result.W1 + "/" + result.W2 + "/" + result.W3;
When the event is thrown i got the following error message in the logs:
User does not have visibility permission for ContentLoaderFunctions
AND (anonymous)
Execution error in service script [<THINGNAME>Event.DataChange:Property.ktid] : Wrapped java.lang.RuntimeException: Entity [ContentLoaderFunctions] does not exist Cause: Entity [ContentLoaderFunctions] does not exist
What permissions are left here?
Thanks in advance
Hannes
Solved! Go to Solution.
Add visibility and runtime permission to "Resources" to the user/organization on "SYSTEM" category. This may be the issue.
Add visibility and runtime permission to "Resources" to the user/organization on "SYSTEM" category. This may be the issue.
Hey, thanks for the fast response. Thats it! It worked when i added visbility and runtime permissions to the resource "ContentLoaderFunctions".
Thanks a lot!
