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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Import extensions as non-admin user ?

vmihai
1-Newbie

Import extensions as non-admin user ?

Hi,

Is there a way to import extensions through a rest call/service or any other option ? I would like to provide import/export rights to non-admin users.

Thank you,

Veronica

1 ACCEPTED SOLUTION

Accepted Solutions
brue
1-Newbie
(To:vmihai)

Yes, you can provide an administrator app key to the users who can then make a POST call to ExtensionPackageUploader. However, providing that app key is giving the non-admin users quite a bit of power to the system. That app key will not be limited to extension import, rather could be used for any administrative service.

Here is how you setup your POST call:

  • POST to /Thingworx/ExtensionPackageUploader
  • Headers
    • Accept:                 application/json
    • appKey:                your administrative app key
    • X-XSRF-TOKEN:  TWX-XSRF-TOKEN-VALUE
    • Content-type:        multipart/form-data
  • Payload
    • Your extension zip file

View solution in original post

5 REPLIES 5
brue
1-Newbie
(To:vmihai)

No,

Importing extensions is an administrative action and the user either needs to be Administrator or part of the Administrators group.

vmihai
1-Newbie
(To:brue)

Hi Brian,

Thank you for your reply. I could use an Administrator app key to allow them to do this in the background if there was a way to import extensions remotely . I know there is a way to import entities from an Edge Agent for example, would it be possible to import extensions in the same way as well ?

Thank you,

Veronica

brue
1-Newbie
(To:vmihai)

Yes, you can provide an administrator app key to the users who can then make a POST call to ExtensionPackageUploader. However, providing that app key is giving the non-admin users quite a bit of power to the system. That app key will not be limited to extension import, rather could be used for any administrative service.

Here is how you setup your POST call:

  • POST to /Thingworx/ExtensionPackageUploader
  • Headers
    • Accept:                 application/json
    • appKey:                your administrative app key
    • X-XSRF-TOKEN:  TWX-XSRF-TOKEN-VALUE
    • Content-type:        multipart/form-data
  • Payload
    • Your extension zip file
vmihai
1-Newbie
(To:brue)

Thank you Brian, that is exactly what I was looking for .

brue
1-Newbie
(To:vmihai)

You're welcome! Good luck.

Top Tags