save the output of the result generated from jira Rest API

Hi , 

I run the below query which gives me all the issues which are in Development state for a given user . How do I save this in a python dictionary .

curl -D- -u user:pwd -X POST -H "Content-Type: application/json" --data '{"jql": "assignee in (uszsyj1) AND status = \"In Development\" ","startAt": 0,"fields": [ "id","key"]}' "http://myurl/rest/api/2/search"

Thanks

Sandeep

1 answer

Hi Nic , 

That link points to my previous question , I was able to figure it out , but for me the next step is to save the output in a python dictionary . This is what I am doing :

import urllib

import json

import requests

query = 'assignee = uszsyj1 AND status = \"In Development\"","startAt": 0,"fields": [ "id","key"]'
jql = '/rest/api/2/search?jql=%s' % urllib.quote(query)

serverURL ='http://zmyurl/rest/api/2/search'

response = requests.put(serverurl +jql ,verify=false,auth=('uszsyj1','******'))

when i do response.status_code

i get 404

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 54m ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

18 views 0 3
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