Skip to main content
1-Visitor
February 12, 2021
Solved

Export as well as import entities using custom script

  • February 12, 2021
  • 2 replies
  • 1859 views

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.

Best answer by c_lowy

Hi @ranjank,

 

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

 

Please refer also to SourceControlFunctions.

2 replies

c_lowy16-PearlAnswer
16-Pearl
February 12, 2021

Hi @ranjank,

 

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

 

Please refer also to SourceControlFunctions.

ranjank1-VisitorAuthor
1-Visitor
February 13, 2021

@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.

 

 

16-Pearl
February 15, 2021

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.

Support
March 9, 2021

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