Skip to main content
1-Visitor
January 3, 2018
Solved

Create connection using API

  • January 3, 2018
  • 1 reply
  • 2633 views

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.

Best answer by PaiChung

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

1 reply

22-Sapphire I
January 3, 2018

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.

asaito-31-VisitorAuthor
1-Visitor
January 3, 2018

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

22-Sapphire I
January 3, 2018

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