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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Rest api

karthik2
7-Bedrock

Rest api

Hi friends,

i am unable to execute the rest api and get the ouput like client id,grant type and access token e.t.c; i write the following code till it is not executing please help me.

var params = {

headers: {

    "grant type":xxxxx

    "client id":xxxxxx

    "client_secret": xxxxx

    "resource": xxxxxxx

} /* JSON */,

ignoreSSLErrors: false /* BOOLEAN */,

useProxy: undefined /* BOOLEAN */,

proxyHost: undefined /* STRING */,

url: "http://some_url/sampleXMLDocument.xml" /* STRING */,

timeout: 30000 /* NUMBER */,

proxyPort: undefined /* INTEGER */,

password: "fakePassword" /* STRING */,

username: "Administrator"/* STRING */

};

var result = Resources["ContentLoaderFunctions"].LoadJSON(params);

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:karthik2)

Hi @karthik2 

 

Not sure if I understood your request well, but maybe https://www.ptc.com/en/support/article/CS290180 may help you.

 

Regards

Christophe

 

View solution in original post

2 REPLIES 2
cmorfin
19-Tanzanite
(To:karthik2)

Hi @karthik2 

 

Not sure if I understood your request well, but maybe https://www.ptc.com/en/support/article/CS290180 may help you.

 

Regards

Christophe

 

slangley
23-Emerald II
(To:karthik2)

Hi @karthik2.

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Thank you for participating in our community!

 

Regards.

 

--Sharon

Top Tags