Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events