Hey there!
I'm struggling to find information on what actual jira version cloud instances run. I'd have to use the REST API's createmeta endpoint and should be able to tell whether I should be using the pre-8.4 or the post-8.4 approach to get the required data for projects/issue types.
Is it really my berst option to try one, see if it fails, then try the other? Doesn't seem very productive to me.
I hope there's something more elegant that I didn't find yet.
Thanks,
Richie
You don't really care what the Cloud version is. You can get to it if you really want, via a REST call, but it is of no use to you. It can change without warning, and it does, frequently. And it's a string of numbers, little more than a build number, not a Major.Minor.Point style version, so it wouldn't tell you anything about 8.4 or 8.5
The REST API for Server is different to the Cloud REST API. Not a lot, as they do much the same thing with similar data structures, but you should be reading the Cloud REST API docs, not the 8.4/8.5 stuff for Server.
Sorry, I should also have pointed to https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/ which is the stable Cloud version (version 3 is available, but in beta at the moment)
If you expand the "issues" section on the left, you should see the "get create metadata" call documented.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So to be able to support create on whatever version the client wants to use the integration with, I have to be able to support pre-8.4, post-8.4 and cloud versions of the REST API's approach of the createmeta endpoint?
To be honest, the pre-8.4 approach looks the same as the cloud one, so I can probably be fine with branching the create logic only two ways(post-8.4 and pre-8.4/Cloud), right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahh, I see, you're creating something that wants to talk to "Jira", without caring if it is Cloud, Server or Data Centre (not that you'd really care about Server/DC - they share the same code base). Technically, they're different products, and while the REST APIs for Cloud and Server are very similar, they're not quite the same, and may diverge over time, as Cloud and Server continue to diverge.
So, yes, you're right, you will need to code for Cloud, Server and the various server versions, and somewhere make a call to establish which branch to take when the APIs have diverged. I used Rudy's serverInfo call to ask a Jira whether it was Cloud or Server when I ran into this.
For what it's worth, Atlassian try to keep the REST APIs as stable as possible - it's very rare that a REST call will stop working when a new version of Jira is deployed. They might add new calls and parameters, but new stuff doesn't affect existing stuff.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For cloud you can use
https://your-domain.atlassian.com/rest/api/3/serverInfo
Which give you
{
"baseUrl": "https://your-domain.atlassian.net",
"version": "1001.0.0-SNAPSHOT",
"versionNumbers": [
1001,
0,
0
],
"deploymentType": "Cloud",
"buildNumber": 100146,
"buildDate": "2020-09-16T22:27:06.000+0530",
"scmInfo": "2252177febf411d5d56f408e8d38dbc0e2a1d5fd",
"serverTitle": "JIRA",
"defaultLocale": {
"locale": "en_US"
}
}
The buildNumber in combination with the version gives away the complete version you are on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is, that I can't -for example- use the cloud server's build number for checks like how the createmeta endpoint is working on a given instance.
Pre-8.4(build number: 804001) createmeta seems to be working the same as on my cloud instance(build number: 100146). So comparing them by build numbers or anything is not relevant since the cloud seems to be an 'older' version(in case of the createmeta endpoint) than anything after v8.4.
It seems like(again, judging from how the createmeta endpoint works) the cloud instances are still running a pre-8.4 jira version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.