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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Create connection using API

asaito-3
3-Visitor

Create connection using API

Hi All

I want to use an API from another application...
how do I create a connector (or something) to use it?
Any tips?

Thanks,

Anselmo.

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:asaito-3)

I would start with the GetText or PostText services before using the JSON ones and output the result directly as String to see if the call is succesfully retrieving information.

Then do the JSON call and you can then do jsonObject,element to get values out of it.

Now please note if the result coming back is a JSON Array, thingworx adds .array so it would be jsonObject.array.element

View solution in original post

6 REPLIES 6
PaiChung
22-Sapphire I
(To:asaito-3)

Sounds like you want to create an extension, but you could just start with a Thing and create services that invoke API calls, then make that into a template and that into an extension.

Wait...but when I create a Thing, what kind of thing template should I use?

PaiChung
22-Sapphire I
(To:asaito-3)

Use the Generic Thing Template and then use the Content Loader functions to create REST calls

Almost there...The result are coming as a blank JSON file.
The question is : are we not able to see the result of these functions?

PaiChung
22-Sapphire I
(To:asaito-3)

I would start with the GetText or PostText services before using the JSON ones and output the result directly as String to see if the call is succesfully retrieving information.

Then do the JSON call and you can then do jsonObject,element to get values out of it.

Now please note if the result coming back is a JSON Array, thingworx adds .array so it would be jsonObject.array.element

Thanks!! I managed how to do it! (:

Top Tags