Hi guys.
I am using java SDK for JIRA, and I want to use a specific REST api version.
I see in the client code, that using latest is hard-coded:
public AsynchronousJiraRestClient(final URI serverUri, final DisposableHttpClient httpClient) {
final URI baseUri = UriBuilder.fromUri(serverUri).path("/rest/api/latest").build();
Is there any way to make the SDK use a specific version (e.g: /rest/api/2) ?
Thanks,
Udi.
Hi
I see that you're using the Atlassian SDK to create a plugin for Jira, but by default creating a REST call from this is always defaulting to use the latest API version.
I have to admit, I'm confused by this request. Jira Server's current REST API version is version 2. So even calling /latest/ should still return the same as the /2/ endpoints in all the current Jira Server versions. More details in Jira Server Developer: REST APIs: URI structure.
The current API version is
2
. However, there is also a symbolic version calledlatest
that resolves to the latest version supported by the given Jira instance.
I did find some more details over in REST plugin module, that explains how you can specify the api-version, but this appears to be when specifically creating your own APIs for your own plugin. So perhaps that doesn't apply for how you call Jira's endpoints.
Could you let me know some more details here? Specifically is there an endpoint you're trying to call that doesn't behave as expected under /latest/ when it does under /2/ ? And perhaps if you can let me know what version of Jira and the version of the Atlassian SDK in use here, perhaps that is a factor here as well.
Regards,
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.