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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

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

EM_9923519
12-Amethyst

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

 
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? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:EM_9923519)

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

View solution in original post

5 REPLIES 5
slangley
23-Emerald II
(To:EM_9923519)

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

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

slangley
23-Emerald II
(To:EM_9923519)

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

slangley
23-Emerald II
(To:slangley)

Hi @EM_9923519.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:EM_9923519)

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

Top Tags