Skip to main content
9-Granite
September 4, 2020
Solved

OData Services and API Mapping Best Practices for Import/Export and Upgrades

  • September 4, 2020
  • 1 reply
  • 4362 views

Hi,

 

I am looking for advice/direction on best practices when it comes to creating API Mappings and Services for custom mashups.  For example, is it best to create these on the ptc-windchill-OData- connector or somewhere else.  If created on ptc-windchill-OData-connector, what are the best practices in regards to import/export especially when moving from one version to another (e.g., 8.5.3 to 9.0)?

 

Any advice/guidance would be appreciated.

 

Thanks,

 

Roy

Best answer by Arshad

Hi Roy

 

PTC recommends using ODATA Connector and Windchill REST Services in order to execute Info*Engine tasks for Customization. Refer to Help Center topic : Executing Info*Engine services with the OData Connector

 

For information on how to export/import customization refer ThingWorx Navigate Upgrade guide for 9.0.

 

Regards,
Arshad

1 reply

Arshad17-PeridotAnswer
17-Peridot
September 4, 2020

Hi Roy

 

PTC recommends using ODATA Connector and Windchill REST Services in order to execute Info*Engine tasks for Customization. Refer to Help Center topic : Executing Info*Engine services with the OData Connector

 

For information on how to export/import customization refer ThingWorx Navigate Upgrade guide for 9.0.

 

Regards,
Arshad

RGosline9-GraniteAuthor
9-Granite
September 4, 2020

Arshad,

 

Got it - I will create a new ODataConnector Thing for Windchill REST Services and use that for my new services instead of ptc-windchill-OData-connector.

 

Thanks,

 

Roy

12-Amethyst
September 8, 2020

Roy,

separating your services on a dedicated connector is definitely best practice for easier deployments and upgrades.

If you are working with APIMaps, you'll have an additional challenge when deploying on other Thingworx systems. The APIMaps of all IntegrationConnectors are stored in the configuration of the Integration Subsystem. You can ex-and import the complete Integration Subsystem but this will not separate APIMaps for different connectors and solutions. I have created a IntegrationConnectorExpImpHelper Thing to address that (attached). It has two services:

  1. Prep4Export will prepare ALL IntegrationConnectors on your system by copying the APIMaps from the Integration Subsystem to a Property called APIMaps on each of the IntegrationConnector Things. This way you have all info that belongs to the IntegrationConnector self-contained with it.
  2. Import is a post-Import action in fact and will take the values of the APIMaps property of each IntergationConnector Thing and copy it to the Integration Subsystem.

As both services are no-arg services they can be called easily as pre-package and post-install services in a CI environment if needed. They are Javascript based so you can check out the code.