How to Parse /rest/api/2/project GET results for "Name" comma "Key"?

I know this is simple for some, but I've searched the Atlassian JIRA forums and other REST API sites and still can't find a simple example of parsing the results of the GET command  for /rest/api/2/project.

In the example from, the results are:

"self": "",
        "id": "10000",
        "key": "EX",
        "name": "Example",
        "avatarUrls": {
            "24x24": "",
            "16x16": "",
            "32x32": "",
            "48x48": ""

Is there a simple command for having the results only include the following:

"EX, Example"  - this would be ONLY the key value and the project name, separated by a comma. That's ALL I want. Please don't respond if your answer is "I have a plug-in you can buy for this". I'm not the sharpest pencil in the box, but there must be a command that will get the desired data, without all the html garbage. 


2 answers

1 accepted

Hey Chris,

Hope this helps, I could get by Python Requests.

import requests
import json
headers = {

r=requests.get('', headers=headers)
k= json.loads(r.text)
searchresults = len(k)
for index in range(searchresults):
        print('Project Key is',k[index]['key'],'and project name is:',k[index]['name'])

Screen Shot 2017-06-05 at 1.51.15 PM.png




Thanks, Chander!! This looks like what I need.

Glad, that i could help you. 

Thank you please roaiting intent html

  1. Thankyou please for now html.glad 

Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

275 views 6 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot