Skip to main content
13-Aquamarine
July 16, 2021
Solved

How to verify curl thingworx api Imported extension success and wheretoupload SourceControl zip file

  • July 16, 2021
  • 2 replies
  • 2595 views
 
I used following command to install an extension (ConsoleFramework) :
curl -v
--header X-XSRF-TOKEN:TWX-XSRF-TOKEN-VALUE
--header appKey:myappkey 
--header userid:myuser
--header connection:close
-F  upload=C:\Common_Investment_PTC.CI.ConsoleFramework-2.3.0-EXTENSION.zip
-A "Mozilla"

-H "Connection: close"

 

I got some messages (image attached)

 

When going to composer I try to find the extension but it is not there, so I guess I need to upload source control zip file too, could you please tell me how to do it, I mean what would be the command to upload the source, how to change the command and the url of the service  xxx/Thingworx/xxxx ??

 

Finally could you please tell me how to validate if everything was correctly installed, Do I search ConsoleFramework in the composer installed extensions? 

 

Best answer by slangley

Hi @EM_9923519

 

A colleague was able to figure this out and I validated under 9.2.1.  Here's the syntax:

 

curl -v "http://localhost:8080/Thingworx/ExtensionPackageUploader?purpose=import" -H "X-XSRF-TOKEN: TWX-XSRF-TOKEN-VALUE" -F "file=@PATH_TO_EXTENSION" -H "appKey: APPKEY_HERE"

 

Just update the sections in red.

 

Please let me know if you run into any problems.

 

Regards.

 

--Sharon

2 replies

Support
July 27, 2021

Hi @EM_9923519.

 

Have you tested to see if the extension installs when importing through Composer?  What version of ThingWorx are you running?

 

Please let me know and I'll spend some time to test your method.

 

Regards.

 

--Sharon

13-Aquamarine
July 28, 2021

I am using ThingWorx  8.5.3-b123  the extension does install when importing through Composer

Support
September 21, 2021

Hi @EM_9923519

 

Here's an article that may help.  Unfortunately, since the ThingWorx version you are running is out of support, I'm not able to test it on that release.

 

Please let me know how it goes.

 

Regards.

 

--Sharon

slangleyCommunity ManagerAnswer
Support
October 22, 2021

Hi @EM_9923519

 

A colleague was able to figure this out and I validated under 9.2.1.  Here's the syntax:

 

curl -v "http://localhost:8080/Thingworx/ExtensionPackageUploader?purpose=import" -H "X-XSRF-TOKEN: TWX-XSRF-TOKEN-VALUE" -F "file=@PATH_TO_EXTENSION" -H "appKey: APPKEY_HERE"

 

Just update the sections in red.

 

Please let me know if you run into any problems.

 

Regards.

 

--Sharon