On a purely technical level, you can only get a site url from a site by asking the site.
When you want to know the url for a site, you need to visit the site to ask it, and to do that, you already have to know where it is, so you've already got the answer.
Could you explain the question a bit more? Given that you know what site you want to talk to, what do you mean by "get the site url"?
So the "customer site" is some kind of self-written software, is this correct?
In that case you must speak to the person being responsible for it.
Even in case it would be an Atlassian Cloud product the person should be able to tell you the site name (I doubt this is the case, though, because there is no such option like writing to a database).
So what I understood is:
You have a Jira Cloud based site, like https://YourGreatProject.atlassian.net and you try to make calls to a "customer site with database involvement" like https://customersite.example.org - maybe using Webhooks.
In order to get the "customersite.example.org" you would talk to the customer, he tells the address, you contact the web service there and during further processing this systems does things in it's very own database.
Is all of the above correct? If not, you could visualize it for a better understanding.
Here's what I'm saying. I have a site 'jesse.atlassian.net' used in development. When I make an api call 'https://jesse.atlassian.net/rest/api/3/issue/' for instance. I get all the issues I created in the course of development.
Now, how do I use the customer's site 'customer.atlassian.net' to make api calls in my app 'https://customer.atlassian.net/rest/api/3/issue/' to get the issues created in the customer site.
This is mainly what Web Hooks are made for. As soon as something (^something you have to specify like an issue update) occurs the endpoint of customer's instance can be called:
That you do not need to start from scratch with all the logic mentioned above nowadays Web Hooks are ofted tied to Automation - which basically says, "when X happens, THEN call restpoint Y in remote instance".
Further information can be found here:
>Now, how do I use the customer's site 'customer.atlassian.net' to make api calls in my app 'https://customer.atlassian.net/rest/api/3/issue/' to get the issues created in the customer site.
You do exactly the same as you did with your site, just with the url for theirs.
Thank you Nic and Dan for your replies so far.
Dan, I understand the part about webhooks but what if I want to retrieve data, not necessarily when something happens.
And Nic, my question now is go do I know the customer's url to use. Should I prompt them to provide it? Also, how do I get the api token for authentication of the api calls?
>what if I want to retrieve data
Use the REST API to read data from the Cloud instance, exactly as you have with your own REST calls above (the call to /rest/api/3/issue you mentioned)
>do I know the customer's url to use.
I don't know. How else might you go about it?
>Also, how do I get the api token for authentication of the api calls?
See the authentication and authorisation section on https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#about (there's two options, depending on whether your application is a connect app or not)
On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link. We've seen a number of questions already asking for...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events