The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Is it possible to use Asset API "asUser/asApp" using other forge module than AssetsImportType?

Adam Repaský
February 9, 2024

For instance, this request:

let res = await api.asUser().requestJira(route`/jsm/assets/workspace/${workspaceId}/v1/importsource/${importId}/configstatus`);


It works just fine for AssetsImportType module, but I'm getting 403 forbidden, when I try running it in other forge modules. I understand that workspaceId & importId are provided within AssetsImportType module's extensionContext. However, lets say, when I provide them "manually" for some other module isn't it supposed to work too?


Also I have managed to run the same request using fetch(
) just fine. However I need to provide the basic auth for that manually. Also first I have to create request fetch("

https://api.atlassian.com/jsm/assets/v1/imports/info") with authorization bearer token just to receive workspaceId & importId, which are the steps I would like to omit.

Any idea if it is like this on purpose, or is it something that may work in future? Or am I missing something?

Thanks for any info!

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events