So i want to get json data from my jira project which has a jql selection included:
https://(system).atlassian.net/rest/api/3/search?jql=project=(projectname) AND issuetype=Bug AND (priority = High OR priority = Blocker)
The problem is, that i have to authenticate myself to Jira, but unfortunately i don't know how to do that in Java.
I hope someone can help me out!
Hey @Alexander kuttner, may I ask why don't you use a selfhosted environment? It is a lot easier there to authenticate, as you don't have to handle API tokens and 2FA ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you have Jira installed on your servers, for example "jira.[yourdomain.com]", it is called "self hosted", instead of Jira cloud with [name].atlassian.net. Functions in Jira cloud (especially in the free tier) may be limited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahh it's because we are doing a diploma and our manager gave it to us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to community. Please look at the sample code for Java to see an example of authenticating your user using REST API. For example
// This code sample uses the 'Unirest' library:
// http://unirest.io/java.html
HttpResponse<JsonNode> response = Unirest.get("https://your-domain.atlassian.net/rest/api/3/jql/autocompletedata")
.basicAuth("email@example.com", "<api_token>")
.header("Accept", "application/json")
.asJson();
System.out.println(response.getBody());
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.