Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to find server Id programatically Edited

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 Mar 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.

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
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,894 views 11 5
Join discussion

Community Events

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

Events near you