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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Import extensions as non-admin user ?

vmihai
12-Amethyst

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

ACCEPTED SOLUTION

Accepted Solutions
brue
12-Amethyst
(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
12-Amethyst
(To:vmihai)

No,

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

vmihai
12-Amethyst
(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
12-Amethyst
(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
12-Amethyst
(To:brue)

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

brue
12-Amethyst
(To:vmihai)

You're welcome! Good luck.

Announcements


Top Tags