Skip to main content
14-Alexandrite
April 24, 2023
Solved

Thingworx custom HTTP integration connector code example

  • April 24, 2023
  • 1 reply
  • 3088 views

Hi Team,

I am new to REST API integration with Thingworx. I was exploring Integration connector topic in which it mentions to create custom HTTP integration connector. I was wondering  if I can use this HTTP connector to integrate any REST api which is available as open source for testing (for eg any weather api ) ? 

Also, can I get any example to create HTTP Integration connector. Thanks in advance.

Kindly assist.

 

Regards,

Sid

 

 

 

Best answer by Velkumar

Hi @Siddharth_Jhs 

 

Check this link for Custom HTTP Connector creation - Creating a Custom Integration Connector (ptc.com)

 

Yes, you can integrate any REST API using Thingworx HTTP Connector. But you have to create a Swagger structure for the API endpoint list. You can refer to this link for Swagger Structure - Basic Structure (swagger.io)  & OpenAPI Specification - Version 2.0 | Swagger (Thingworx supports JSON structure )

 

Alternatively, you can use ContentLoader functions in Thingworx to consume REST API - ContentLoader (ThingWorx Platform API 9.3.0) (ptc.com)

 

This site consists of some dummy API - Reqres - A hosted REST-API ready to respond to your AJAX requests You can play with it

 

/VR

1 reply

Velkumar19-TanzaniteAnswer
19-Tanzanite
April 25, 2023

Hi @Siddharth_Jhs 

 

Check this link for Custom HTTP Connector creation - Creating a Custom Integration Connector (ptc.com)

 

Yes, you can integrate any REST API using Thingworx HTTP Connector. But you have to create a Swagger structure for the API endpoint list. You can refer to this link for Swagger Structure - Basic Structure (swagger.io)  & OpenAPI Specification - Version 2.0 | Swagger (Thingworx supports JSON structure )

 

Alternatively, you can use ContentLoader functions in Thingworx to consume REST API - ContentLoader (ThingWorx Platform API 9.3.0) (ptc.com)

 

This site consists of some dummy API - Reqres - A hosted REST-API ready to respond to your AJAX requests You can play with it

 

/VR

19-Tanzanite
April 25, 2023

By far the easiest path I would suggest is using the ContentLoader, as @Velkumar suggested - if your application scale allows this.