Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
hii,
i have one API contains a data, now i want to get that api data in json format how i get this data?
i have call the POSTJson service from snippets and i have give that api in url parameter but i didn't get the data it's just showing empty header . here are some output snapshots and a script snapshot please refer for better understandings
output snapshot:-
script snapshot:-
var params = {
proxyScheme: undefined /* STRING */,
headers: undefined /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
withCookies: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "http://<IPADDRESS>/Thingworx/Things/<Thingname>/Services/<ServiceName>?Appicationkey=<Value>" /* STRING */,
content: undefined /* JSON */,
timeout: undefined /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: JSON
var result = Resources["ContentLoaderFunctions"].PostJSON(params);
Hello @Ru ,
There is an article that might help as well some other posts I am sharing now with you:
https://www.ptc.com/en/support/article/CS245905?&source=snippet
https://community.ptc.com/t5/IoT-Tech-Tips/REST-API-Overview-and-Examples/m-p/534777
https://community.ptc.com/t5/ThingWorx-Developers/ThingWorx-REST-API-Cheat-Sheet/m-p/532533
Hope it helps,