jira|November 10, 2017|1 min read

Jira Rest APIs common usages

TL;DR

Use JIRA REST APIs like createmeta to fetch custom field values, create issues programmatically, and automate JIRA workflows with basic authentication.

Jira Rest APIs common usages

This article shows some of common usages of JIRA rest apis.

Note: This article assumes you have a username and password for calling rest api of JIRA.

Get values of a custom field for a project

You know about a custom field, and want to get its possible values like a drop down having alot of options.

There is an API: createmeta, which gives you every possible field require to create JIRA issues.

Note: This API is pretty expensive in terms of data. It can give you complete data for all the projects. But, you might be interested in one or two projects.

curl -u "username:password" "https://jira_url/rest/api/2/issue/createmeta?projectKeys=XYZ"

Above api call will give you very limited result, which has only the issue types, and no expanded fields. But, we are interested in getting data of a custom field.

curl -u "username:password" "https://jira_url/rest/api/2/issue/createmeta?projectKeys=XYZ&expand=projects.issuetypes.fields"

Now, you are telling JIRA to return expanded fields, and now you will get values of all custom fields that appear while creating a JIRA issue in your project XYZ, and for each issuetype.

Related Posts

Drupal Helpful codes for database queries

Drupal Helpful codes for database queries

Being a drupal user from last around 5 years, I used to know small codes for…

Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl is a wonderful tool for initiate REST APIs or calls. Or, you can literally…

Docker image for Drupal 7, and Php extension MongoDB installed.

Docker image for Drupal 7, and Php extension MongoDB installed.

You have drupal 7 image from docker hub, and want to connect tomongo db via php…

Docker Push: How to push your docker image to your organization in hub.docker.com

Docker Push: How to push your docker image to your organization in hub.docker.com

Tag the image, by seeing its image id, from docker images command docker tag 04d…

How to get Youtube Video Thumbnail Images

How to get Youtube Video Thumbnail Images

If your youtube video looks like:https://www.youtube.com/watch?v=g0kFl7sBdDQ…

php55w-common conflicts with php-common-5.* | Php issues while installing libraries

php55w-common conflicts with php-common-5.* | Php issues while installing libraries

I was trying to install mongo extension with pecl. It gave me error: Then, I…

Latest Posts

Deep Dive on Elasticsearch: A System Design Interview Perspective

Deep Dive on Elasticsearch: A System Design Interview Perspective

“If you’re searching, filtering, or aggregating over large volumes of semi…

Deep Dive on Apache Kafka: A System Design Interview Perspective

Deep Dive on Apache Kafka: A System Design Interview Perspective

“Kafka is not a message queue. It’s a distributed commit log that happens to be…

Deep Dive on Redis: Architecture, Data Structures, and Production Usage

Deep Dive on Redis: Architecture, Data Structures, and Production Usage

“Redis is not just a cache. It’s a data structure server that happens to be…

Deep Dive on API Gateway: A System Design Interview Perspective

Deep Dive on API Gateway: A System Design Interview Perspective

“An API Gateway is the front door to your microservices. Every request walks…

REST API Design: Pagination, Versioning, and Best Practices

REST API Design: Pagination, Versioning, and Best Practices

Every time two systems need to talk, someone has to design the contract between…

Efficient Data Modelling: A Practical Guide for Production Systems

Efficient Data Modelling: A Practical Guide for Production Systems

Most engineers learn data modelling backwards. They draw an ER diagram…