Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
In case it's useful for anyone, I successfully used the Thingworx Importer to import an Entity using version 8.4.1. The import command was in a CURL script (can also be run using e.g. Cygwin on Windows) and the entity data was contained in an XML file. The XML file is attached to this post, and the CURL script is copied into the bottom of the post body.
Notes on using the script:
>>>>>>>>>>>>
#!/bin/bash
APPKEY="2e6704c0-XXXX-XXXX-XXXX-a1589e387d1a"
TWX_HTTP_PORT="8018"
FILE_PATH_TWX="Things_testImport.xml"
PROTOCOL="http://"
IP="localhost"
URL="$PROTOCOL""$IP"":""$TWX_HTTP_PORT""/Thingworx/Importer?purpose=import"
curl -X POST -H 'appKey: '$APPKEY \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'x-thingworx-session: true' \
-H 'X-XSRF-TOKEN: TWX-XSRF-TOKEN-VALUE' \
-F 'upload=@'$FILE_PATH_TWX \
$URL
<<<<<<<<<<<<
Also TWX Importer is explained in this support article.
I have tried do import as your step but got this error.
I think the problem is that the curl command is not installed on your version of Linux. So you need to search online for the install steps for your version of Linux, for example "linux ubuntu install curl".
Thanks, It's truly my mistake, and I have reinstalled my CURL tool.
For now, I have also successfully imported this TestThing.Xml under your useful guidance, but how should I do to import Multiple files (e.g. DataShape, ThingShape and ThingWorx Extension etc) at once, Expect for your replies ! !