How to use Atlassian Connect to get Jira data and generate a JSON?

4

I need to make a script that gets some data from Jira and I believe you have to use the Atlassian Connect API that uses a server in Node.js.

However, I do not want to manipulate the data using the API and rather just get them and manipulate with another language.

So it is possible to use only the API and generate a JSON file with the obtained data? How?

    
asked by anonymous 15.09.2017 / 13:09

1 answer

5

Atlassian Connect lets you create extensions (integrations or plugins depending on how you prefer to call them) and is not necessary if you just want to make some requests for Jira endpoints .

As already noted in the comments, there is a abundant documentation in the developers section.

The first thing to look for is what type of service you are dealing with, that is: Cloud (hosted by Atlassian) or Server (installed on your company).

Depending on what you want, the difference between such versions will be just the authentication method, but you can usually use Basic HTTP Authentication , you only need to have or seek to obtain the necessary credentials.

For example, if you want to see issues ( issues ) for a project, there is an API that lets you run # and get the result in JSON. I have a JSON query that I want to use. Use any language for this.

In the case of the jira.spring.io site, I tested the following command to search for all bugs to project spr :

curl -X POST -H "Content-Type: application/json" --data \
    '{ "jql": "project = spr AND issuetype = \"bug\"","startAt": 0,"maxResults": 15,"fields": ["summary","status","issuetype"]}' \
    https://jira.spring.io/rest/api/2/search

The legal thing is that it works anonymously, without the need for credentials, because it is a public project.

You can customize the search for your needs and also search for other endpoints if you need other information.

    
15.09.2017 / 21:08