Skip to main content
1-Visitor
April 19, 2017
Solved

How can I implement service to importing/exporting Entity

  • April 19, 2017
  • 1 reply
  • 3655 views

I found ReadEntityAsJSON  service to export entity information. BUT It's not export delicate information(ex) stream data)

Is there supporting system to importing and exporting Entity?

Thanks.

    Best answer by ttielebein

    Saving to the repository is essentially what happens when you export to source control. There is probably a way to do that via service script... yeah, something like this:

    http://localhost/Thingworx/Resources/SourceControlFunctions/Services/ExportSourceControlledEntities?Accept=application%2…

    1 reply

    5-Regular Member
    April 19, 2017

    Have you seen this KCS article on this? Notice the "WithData=true" in the URL. I hope this helps!

    kpark11-VisitorAuthor
    1-Visitor
    April 20, 2017

    Thanks Tori

    It DOES work.

    but I have 3 questions

    1. How can I import each entity(not entities) with data in script?

    2. Can it save in repository not in exports?

    3. How to import entity in Service from script

    5-Regular Member
    April 20, 2017

    There is a REST call for importing as well, though I don't know the exact syntax, but it is something like http://localhost/Thingworx/DataImporter

    I will try to find the time to figure out what parameters to use for this, but I wanted to get a comment back to you sooner in case I don't get that chance.