~/jira/35-jira-rest-apis-common-usages.md

Jira Rest APIs common usages

1 min readNovember 10, 2017by Gorav Singal#jira#jira-rest-api#rest-api
// 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.

$ subscribe --weekly

One deep dive a week, in your inbox

System design, AI engineering, trading systems and interview prep. Tested code, real numbers. Free, and you can unsubscribe any time.

or read it on gyanbyte.substack.com

Share

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…

Claude Code Skills — Build a Better Engineering Workflow

Claude Code Skills — Build a Better Engineering Workflow

Most developers use Claude Code like a search engine — ask a question, get an…

Latest Posts

How to Stay Valuable as a Software Engineer in the AI Era: A Practical Playbook

How to Stay Valuable as a Software Engineer in the AI Era: A Practical Playbook

In the previous article I argued that AI is not killing software engineering…

How to Review AI-Generated Code: A Checklist for Catching What the Model Missed

How to Review AI-Generated Code: A Checklist for Catching What the Model Missed

A few months back I approved a PR that was almost entirely AI-generated. It…

How to Debug AI-Generated Code: Understand First, Fix Last

How to Debug AI-Generated Code: Understand First, Fix Last

In the last article I wrote about reviewing AI code before it goes in. This one…

The Future of Software Engineering: What AI Changes, What Stays, and Where the Jobs Go

The Future of Software Engineering: What AI Changes, What Stays, and Where the Jobs Go

Every few weeks somebody sends me a scary headline — “AI will replace all…

The Transactional Outbox Pattern: Never Lose an Event Again

The Transactional Outbox Pattern: Never Lose an Event Again

This is one of those patterns that looks like nothing until you get burnt once…

Event Sourcing, Explained: Store What Happened, Not Just the Final State

Event Sourcing, Explained: Store What Happened, Not Just the Final State

Here is a question I like to ask in interviews: your bank account shows a…