Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,958
Community Members
 
Community Events
168
Community Groups

How to call jira api in postman to get details of project, Epic, Issues and worklogs?

Hi,

I am very new to JIRA and don't know much about JIRA apis. I want to get the details of all projects, all type of issues ( stories, task, epic, sub task and bugs ) and all worklogs by calling jira apis in postman.  Can anyone suggest some link or way to get that done. 

 

 

Thanks in advance 

1 answer

1 accepted

2 votes
Answer accepted

Hi @aagnihotri , welcome to the Atlassian Community!

First of all, you will need to create an API token, following the instructions here. Once you have this API token, for Basic Auth you can encode it using a tool such as Base64Encode, in the format of:

[email_address]:[API_Token] - you will need to use the same email address that you created the API token under. Once you have done this, you can use this in the Authorization header in postman.

So headers required would be:

Key: Content-Type Value: application/json

Key: Authorization Value: Basic [your encoded API key]

There are several API requests you can use once you have done this:

https://[your_cloud_site_name]/rest/api/2/project

This will return all projects in your site, and will include things like the project name, key, type, etc. Note: this will only return the projects that the authenticated user has Browse Issues permission for.

https://[your_cloud_site_name]/rest/api/2/project/[ProjectIdOrKey]

This would return all info related to a specific project, such as the issue types available, components, versions etc.

Worklogs is a bit trickier, I don't believe you can obtain all worklogs across all issues through the API, but if you want to find this out for a specific issue you would use

https://[your_cloud_site_name]/rest/api/2/issue/[IssueIdOrKey]/worklog

Hope this helps!

These would also all be GET requests^

@Callum Carlile _Automation Consultants_ 

Hi,

Thanks for the reply. Now i am able to get all the projects but when i tried to get all issues it is returning blank 

image.png

I used this api

https://solifi.atlassian.net/rest/api/2/issue

 

Can you please tell what am i doing wrong ?

It doesn't exactly work in the same way for normal issues - you would need to put the issue ID or Key at the end of the request URL, which would give you all information for that particular issue.

If you use a URL of

https://[your_cloud_site_name]/rest/api/2/search?jql=

then this should return more results, though depending on how many issues you have on your instance you may hit the maximum search result (you can also just paste this url into your browser for the same result).

There's more info on this similar answer as well as this one too, but you may not be able to retrieve all data of all issues in your site if you have a large number of custom fields or issue numbers

Like aagnihotri likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,045 views 18 32
Read article

Atlassian Community Events