cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

how to get api data in using javascript?

Ru
14-Alexandrite
14-Alexandrite

how to get api data in using javascript?

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

122_0-1611141292874.png

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);

1 REPLY 1
Top Tags