Forums

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

How to get base url of the server of the app?

Victor Wang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 28, 2020

Sorry if this is a super basic question, I'm still trying to figure out how a lot of this works.

I'm building an app for jira software cloud with ACE. I'm trying to make just a standard request to the server using AP.request() but since it's going through ngrok right now, the url keeps changing. Is there a way I can automaticlaly get the url of the app's express server? If there is some other better way to send requests to the server, that would be nice too, I'm open to suggestions.

This is what i'm trying right now if this helps:

const res = await AP.request({
url: baseUrl,
type: 'GET'
});

console.log(res);
app.get('/test-route', addon.authenticate(), (req, res) => {
res.send({"data": "hi"});
});

Thanks

1 answer

1 vote
Oddvin R
Contributor
November 16, 2021

Not sure what you want to do, but from inside your connect-app-page you can use:

...to get either the url to the jira-cloud site or the domain to your hosted connect-app.

Then you should be able to create the urls you need.

Suggest an answer

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

Atlassian Community Events