How to find server Id programatically

Ritesh Shah March 15, 2018

Hi,

Is there any way to get Server ID of Jira server pragmatically ?

Please find attached image . How can I get that server Id value in jira server ?

 

Thanks & Regards.

 

server-id.png

 

2 answers

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2018

This same kind of question was posted previously to our site in https://community.atlassian.com/t5/Answers-Developer-Questions/how-to-get-the-jira-server-info/qaq-p/573364  While the details of that reply were for Jira 6 versions, I think the updated way to find this can be found on

https://docs.atlassian.com/software/jira/docs/api/7.1.1/com/atlassian/jira/bc/license/JiraLicenseService.html

There is a getServerId() method you can call there in order to find this information.    Note that these documents are for the JAVA API.   I don't believe the REST API in Jira actually has this ability.

0 votes
Khilendra Sahu December 13, 2018

If you want jira server id than you can  also  apply like

 

ComponentAccessor.getApplicationProperties().getString("jira.sid.key"); 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events