Manually Importing and Exporting
In Composer, administrator users can view the Import/Export menu, which allows the import and export of data, entities, and extensions. Non-administrative users can manually import data into and export data from ThingWorx using the API, but must have specific design time permissions to do so.
The following design time permissions apply when manually importing and exporting:
To export, users must have design time Read permission.
To import, users must have design time Create permission.
Exporting Manually
From a browser, use the calls in the table below to export data and entities.
Entity export supports binary (application/octet-stream) or XML (text/XML).
Data export (blog, wiki, stream, value stream, and data table data) supports binary (octet-stream).
Exporting Entities
Description
URL Example
Exporting all entities to File (binary)
/Thingworx/Exporter/Exporter/?Accept=application/octet-stream&startdate=2015-08-26T11:33:50&enddate=2015-08-28T11:33:52&searchTags=Applications:testTag&repositoryName=SystemRepository&path=/mydir
All input parameters are defined in this example.
Start Date=
2015-08-26T11:33:50
End Date=
2015-08-28T11:33:52
If the end date is not defined, the current date and time is used.
Model Tags=
Applications:testTag
Repository=
SystemRepository
Path=
mydir
Exporting all entities to File (XML)
/Thingworx/Exporter/?Accept=text/xml&startdate=2015-08-26T11:33:50&enddate=2015-08-28T11:33:52&searchTags=Applications:testTag&repositoryName=SystemRepository&path=/mydir
All input parameters are defined in this example.
Start Date=
2015-08-26T11:33:50
End Date=
2015-08-28T11:33:52
If the end date is not defined, the current date and time is used.
Model Tags=
Applications:testTag
Repository=
SystemRepository
Path=
mydir
Exporting a single entity to file (binary)
/Thingworx/Exporter/ThingTemplates/GenericThing?Accept=application/octet-stream&repositoryName=SystemRepository&path=/mydir
All input parameters are defined in this example.
Entity=ThingTemplate, GenericThing
Repository=System Repository
Path=mydir
Exporting a single entity to file (XML)
/Thingworx/Exporter/ThingTemplates/GenericThing?Accept=text/xml&repositoryName=SystemRepository&path=/mydir
All input parameters are defined in this example.
Entity=ThingTemplate, GenericThing
Repository=System Repository
Path=mydir
Exporting Data
Description
URL Example
Exporting all data to File
/Thingworx/DataExporter/?Accept=application/octet-stream&repositoryName=SystemRepository&path=/mydir
Repository=SystemRepository
Path=mydir
Exporting Data Table data to File
/Thingworx/DataExporter/DataTables/?Accept=application/octet-stream&searchTags=Applications:testTag&repositoryname=SystemRepository&path=/mydir
Model tags=Applications:testTag
Repository=SystemRepository
Path=mydir
Exporting single data to File
/Thingworx/DataExporter/Streams/AlertHistoryStream?Accept=application/octet-stream&startDate=2015-08-26T11:38:46&endDate=2015-08-28T11:38:49&searchTags=Applications:testTag&respositoryName=SystemRepository&path=/mydir
All input parameters are defined in this example.
Collection=Streams
Entity Name=AlertHistoryStream
Start Date=
2015-08-26T11:38:46
End Date=
2015-08-28T11:38:49
If the end date is not defined, the current date and time is used.
Repository=
SystemRepository
Path=
mydir
Importing Manually
Importing is a multiple-part request. We recommend building a simple HTML form like the following:
<html>
<body>
<FORM action="/Thingworx/Importer?purpose=import&usedefaultdataprovider=true&WithSubsystems=false"
enctype="multipart/form-data"
method="post"
<P>
<BR>
What files are you sending? <INPUT type="file" name="files"><BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
</body>
</html>