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

How to use Importer to import a XML file

SOLVED
Alexandrite

How to use Importer to import a XML file

Hi,

 

I wonder if it is possible to import a XML file by using REST API

"

POST /Thingworx/Importer?purpose=import& usedefaultdataprovider=false& WithSubsystems=false HTTP/1.1
Host: <<server>>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Accept: */*
Authorization: Basic <<base64>>
cache-control: no-cache

Content-Disposition: form-data; name="file"; filename="R:\TestProject\Things\TestFeature1.xml


------WebKitFormBoundary7MA4YWxkTrZu0gW--

"

 

I tried a HTTP request above, but it did not work :(

 

My Bests,

Hung Tran

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to use Importer to import a XML file

The importer service is for importing Thingworx entities, I am assuming that is what you are doing. (to load xml content and parse use the content loader functions)

Did you get your setup from this article?

https://www.ptc.com/en/support/article?n=CS284714&language=en&posno=9&q=importer&ProductFamily=Thing...

If it didn't succeed I would check the Thingworx Application Log

View solution in original post

2 REPLIES 2
Highlighted

Re: How to use Importer to import a XML file

The importer service is for importing Thingworx entities, I am assuming that is what you are doing. (to load xml content and parse use the content loader functions)

Did you get your setup from this article?

https://www.ptc.com/en/support/article?n=CS284714&language=en&posno=9&q=importer&ProductFamily=Thing...

If it didn't succeed I would check the Thingworx Application Log

View solution in original post

Re: How to use Importer to import a XML file

Hi PaiChung,

 

Thank you very much, that is exactly what I am looking for. I figured out that Content-Type must be text/xml instead of multipart/form-data.

 

My Bests,

Hung Tran

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________