Skip to main content
Feb 12, 2021 4:57 AM UTC
Solved

Export as well as import entities using custom script

Hi Team,

 

Could anybody let me know how to export as well as import entities (single as well as multiple entities) using and PTC script?

Please share the snippet for both import and export (single as well as multiple entities)

 

Thanks in advance.

c_lowyAnswer
Feb 12, 2021 4:41 PM UTC

Hi @ranjank,

 

Here are some out-the-box APIs that can be used to import and export entities : ExportSourceControlledEntities, ExportSourceControlledEntitiesToZipFile, ImportSourceControlledEntities. They are available under the SourceControlFucntions resource.

 

Please refer also to SourceControlFunctions.

4 replies

c_lowyAnswer
Feb 12, 2021 4:41 PM UTC

Hi @ranjank,

 

Here are some out-the-box APIs that can be used to import and export entities : ExportSourceControlledEntities, ExportSourceControlledEntitiesToZipFile, ImportSourceControlledEntities. They are available under the SourceControlFucntions resource.

 

Please refer also to SourceControlFunctions.

ranjankAuthor
Feb 13, 2021 5:30 AM UTC

@c_lowy 

Thank you for your response. Appreciated!!

 

Also, may I know what is the name of api for exporting and importing specific entity both in .xml and .twx format.

 

Also if you let me know the api for data export and import for datatables, streams and valuestreams.

 

 

Feb 15, 2021 8:24 AM UTC

Hi @ranjank,

 

The APIs mentioned in my previous email are the ones available in ThingWorx. They do import/export from/to XML only though.

 

Note that you can also export/import using REST API : Manually Importing and Exporting.

Mar 9, 2021 8:26 PM UTC

Hi @ranjank.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon