Hi guys, I have been trying to get the base url of jira through rest api by passing credentials, but unable to do it. please help...
Thank you
Er, if you know where to go to ask a Jira for its base url, then you already have it.
Try to make a REST call to the endpoint called /rest/api/2/serverInfo
It will contain the baseUrl as a parameter of that Jira instance.
to make rest call i need to give basurl
I am implementing JIRA in my application and i want to verify credentials through rest api without asking for baseurl from user
How to make a rest api call without giving domain ?? i need domain to make a call and that is what i want to get
I'm afraid your requirement is nonsense.
If you don't know the base url, then you can't go to it to ask it where it is.
Imagine a real-world example. You know you want to get a telephone number for someone. What you're asking is to be able to ring them up to get it. But you don't have their number so you can't.
You need to re-think what you are doing here. You MUST give it a base url somehow, if you want to connect to it.
Thanks for your concern.
I believe you are good in imagination, imagine how you are logging into jira by giving just credentials, you dont see your domain/baseurl while logging. I want to implement the same.
@Mohammed Shaik Mehboob
As already mentioned in the other replies, in order to call a REST API endpoint you must already know the base url.
Also, id.atlassian.com is mainly used for Single Sign On. This means that if you have multiple JIRA instances, after you log into id.atlassian.com, you can access all your JIRA instances without having to log-into all of them one by one.
Still, after being authenticated into id.atlassian.com, you need to know which one your JIRA instances are in order to access them.
I hope this helps clarifying.
Best Regards,DarioAtlassian Cloud Support
Little late to the party, but as this is not answered still after 2 years, I'll try to help.Once you have oauth access token of the user, you can make a get call on https://api.atlassian.com/oauth/token/accessible-resources with token.This will give a list of all the sites accessible to the user along with it's cloudIds and siteUrls.More info here: https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/
It looks like you're new here. Sign in or register to get started.