We’re building an integration where customers provide only their Jira base URL. At this stage, we do not collect any credentials.
Our goal is to determine:
Whether the instance is Jira Cloud or not.
If not Cloud, ideally whether it’s Jira Data Center.
Is there a reliable way (via public endpoints) to identify the hosting type just from the base URL?
You and your class mates can save yourself a lot of time when doing your assignments by looking through the Jira REST API documentation and doing some Google research before you ask questions.
If you had looked through the documentation, you would have instantly found the obvious Get Jira instance info endpoint.
And, if you had used Google and searched for “Does Jira have a REST API endpoint that tells me information about the instance?” you would have gotten the same information.
Hello @sunnyape , I went through this already but It says that it required authentication or else will return 401 if the authentication credentials are incorrect.
I tested for few cloud instances and it worked without authentication, but need to be sure on that will it work for every instance without authentication.
Secondly, I want to know if this is the common API that can be used to get serverInfo for DataCentres also. As for this I got this but it doesn’t tell much about response structure and authentication requirement : https://developer.atlassian.com/server/jira/platform/rest/v11000/api-group-serverinfo/#api-group-serverinfo
It would have been more informative if you had disclosed that information from the outset
but It says that it required authentication
You need to re-read that documentation again, as it says the exact opposite :
Returns information about the Jira instance. This operation can be accessed anonymously. Permissions required: None.
If an endpoint can be accessed anonymously and requires no permissions, that means the endpoint doesn’t require any authentication..nothing..zero…zilch…zip..nada.
I tested for few cloud instances and it worked without authentication
Which of course proves that the endpoint works exactly as the documentation says it does.
but I need to be sure on that will it work for every instance without authentication.
What makes you believe the endpoint’s behaviour would randomly change for other Jira Cloud instances? It would be more logical to start with the assumption that the endpoint behaves in the same way for all Jira Cloud instances.
As for this, I got this, but it doesn’t tell much about response structure
You need to re-read that documentation again, as it tells you exactly what the response structure is…and even provides a complete example response!!
If you think the documentation lacks information about the response, just make a request to that endpoint of a Jira DC instance YOURSELF and see for YOURSELF exactly what the response structure is.
I recommend that you liaise with your peers for any further guidance on this topic.