cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Import/Export

rincyraj
1-Newbie

Import/Export

How to import entities and data without losing existing entities and data?

4 REPLIES 4

Hi Raj,

You can import entities and data by using the Import function from the Menu, then select from file or from ThingWorxStorage.
Remember, you must first import entities, then data. Other way around will NOT work.

If you have some other details on your use case, please tell me.

BR,
Vladimir



Is it possible to automate the import function using API or Java script?

Thanks,

Hi Vladimir,

Thanks for your response. It really helps me.


By the way can we write any script to import or export entities. We are using a common server for our application development and wanted to take a backup of all entities on daily basis. So I am interested in scripts to do import/export.


Thanks,

Rincy



adam11
5-Regular Member
(To:rincyraj)

Rincy,

Most modern web browsers include web developer tools you can use to "sniff" out the network traffic of ThingWorx. For instance, you can open them while you're using Composer to see the calls being made to import and export entities and data. Take Export to ThingWorxStorage, you can find the REST call being made and use the ContentLoaderFunctions to begin an export from a

Service

:


var params = {

  url: "http://localhost/Thingworx/ExportDatabase?WithData=true",

  username: "Administrator",

  password: "admin"

};


result = Resources["ContentLoaderFunctions"].GetText(params);


When used in conjunction with the ScheduledSystemBackup

Thing

, you'll have a nice way to schedule backups at intervals of your choosing.


Regards,

Adam



Top Tags