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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Attempt to update Axeda Platform Software Package through Groovy script failed

vadimd
3-Visitor

Attempt to update Axeda Platform Software Package through Groovy script failed

I'm using Axeda Platform 6.6 and when I tried to add  DownloadInstruction to Software Package and create or update the package with V2 API SoftwarePackageBridge I received the error:

An unexpected error has occurred. If you continue to receive this error please contact support and report the event

 

Some other instruction like RestartAgentInstruction added successfully.

 

What can  be a reason of such behavior?

Best regards,

Vadim Duchovny, Senior Software Engineer

1 ACCEPTED SOLUTION

Accepted Solutions
ckaminski
13-Aquamarine
(To:vadimd)

Hello, Vadim:

 

   Now I see what's going on.  You are mixing v1 and v2 APIs.  DownloadInstruction is a v1 API. 

 

    You want to use the v2 DownloadFileInstruction:  com.axeda.services.v2.DownloadFileInstruction

 

     You will need to upload the file to the platform first to get a reference.  Please see the following link for more information on the process.

 

https://community.ptc.com/t5/IoT-Tech-Tips/REST-API-Example-Creating-a-Software-Package-with-File-Upload/m-p/534365

 

-Chris Kaminski

View solution in original post

6 REPLIES 6
ckaminski
13-Aquamarine
(To:vadimd)

Hello, Vadim:

 

   Can you post the code sample you are using?  

 

   6.6 had some unimplemented features, but the bridge features are also very particular in their inputs. 

 

Regards,

-Chris Kaminski

See attached file (I renamed it from .groovy to .txt)

Before execution I verified that folder "/var/tmp/delivery" has valid file.

 

Thanks at advance,

Vadim Duchovny

ckaminski
13-Aquamarine
(To:vadimd)

Hello, Vadim:

 

   Now I see what's going on.  You are mixing v1 and v2 APIs.  DownloadInstruction is a v1 API. 

 

    You want to use the v2 DownloadFileInstruction:  com.axeda.services.v2.DownloadFileInstruction

 

     You will need to upload the file to the platform first to get a reference.  Please see the following link for more information on the process.

 

https://community.ptc.com/t5/IoT-Tech-Tips/REST-API-Example-Creating-a-Software-Package-with-File-Upload/m-p/534365

 

-Chris Kaminski

Thank you very much, Chris, for excellent assistance.

I'll try to use the example you mentioned.

Best regards,

Vadim Duchovny

 

Hi, Chris,

 

I didn't saw at first the second page of your explanation where you give the V1 API script.

I used it and now the package successfully created.

Thank you very much for excellent and absolutely clear assistance

Best regards,

Vadim Duchovny

ckaminski
13-Aquamarine
(To:vadimd)

Hello, Vadim,

 

  I'm glad I could assist.

 

  Would you mind please marking this question as Solved?

 

Regards,

-Chris Kaminski

Top Tags