How to get current Jira DataCenter server version in Python

pop75 pop75 May 3, 2021

Hi

I'm looking for way to get Jira DataCenter version while use Python script , do you familiar with any way ? I checked JIRA module but I didn't find this option over there. 

 

BR

po85

2 answers

1 vote
Daniel Ebers
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.
May 8, 2021

Hi @pop75 pop75

in order to query that information via REST API endpoint api/2/serverinfo like Nic already perfectly stated it does not matter if you are coming through a basic auth or personal API token (PAT) available from v8.14 on - these are just slightly differences in authentication, the call to API endpoint which will give you the desired information is the same in technical matters.

So, yes, you can just use Basic Auth for the moment.

Regards,
Daniel

0 votes
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.
May 3, 2021

Your python can make the REST call to get from api/2/serverinfo - the response will contain both the human version and the build number

Note that for DC it will return the info for the node that services the call, other nodes may be running on slightly different versions

pop75 pop75 May 3, 2021

Hi Nic

thank for your reply , I run JIRA DC 8.13.x version Do I have to use Basic auth for the same ? I understood API token available from 8.14.x version

 

BR

po85

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.
May 8, 2021

For the authentication element, I'm going to point at what @Daniel Ebers said - it's right, and better written than what I'd say.

Like Patrick Binggeli likes this

Suggest an answer

Log in or Sign up to answer