How to get JIRA instance ID?

Wojciech Matyja December 2, 2015

Hi, 

I want to save some data which will be associated with particular JIRA instance and project set on that instance.

How can I get it?

3 answers

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2015

How are you defining the "instance id"? 

If that is supposed to be some form of unique identifier for an installation of JIRA, then what are you using for it? 

Wojciech Matyja December 2, 2015

what do you mean by "what are you using for it?"?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2015

Exactly what I asked - what is the "instance id"? What is the definition? What piece of information have *you* chosen to be called the "instance id"?

Wojciech Matyja December 2, 2015

i want to get unique installation identifier.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2015

That's just another set of words meaning the same thing. You need to explain what you think it is. Let me put it another way. You have a JIRA installation. Please look at it and point at the physical string on a screen that shows this "unique installation identifier" that you want to extract.

Ignacio Pulgar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2015

Do you mean the base URL of your instance?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2015

That's what I'm trying to get at - there's loads of things it could be, and "instance id" is meaningless. Base url is a good way to do it (until you're on data-centre, where it might not be, because you'll have many installs on one url). Or there's the SEN. Or the Server ID (which you can change). Or. Or. Or...

0 votes
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2015

If you are writing an Atlassian connect addon then you should use the 'clientKey' that the /installed lifecycle event gives you: https://developer.atlassian.com/static/connect/docs/latest/modules/lifecycle.html That is a unique identifier for Cloud for every instance.

0 votes
Ignacio Pulgar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2015

For the JIRA instance id I would use its base URL: https://<company>.atlassian.net

For the project id, I would use the pid number. I guess there are more elegant (REST API) ways of getting them, but you can look at each project's id by hovering your mouse over their 'edit' option in administrator's projects view: https://<company>.atlassian.net/secure/project/ViewProjects.jspa
and looking at the status bar at the bottom of your browser's window. There you will see a URL which includes 'pid=<number>', and that's the number you might want to use. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2015

The problem here is that we don't know what "instance id" means to the questioner. Also, the base-url might not work for Data Center (one base url, several instances) Although you're spot on with the project ID - I'd always use the project ID as it's immutable and unique.

Ignacio Pulgar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2015

Good point. Then, apart from the pid thing, I think the questioner is actually asking: * what can I use as a unique identifier for a given JIRA instance [within a Data Center]? And how can I get that identifier?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events