Hello All.
Im sure this is something really simple but I just cant seem to figure it out. Trying to give my python script a JQL Query I copied from Atlassian
my goal is to get a list of issues from the JQL Query in Python.
Trying to use the Parse JQL Query documentation but cant seem to get get the results I want.
------------ Here is the Code-----------------
#!/usr/bin/python
#issuetype = "statusCategory in (2, 4) AND assignee in (currentUser()) ORDER BY updated DESC",
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json
url = "https:/myCompany.atlassian.net/rest/api/3/jql/parse"
auth = HTTPBasicAuth("my username", "SuperSecretKeyIUse")
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
payload = json.dumps( {
"queries": [
"statusCategory in (2, 4) AND assignee in (currentUser()) ORDER BY updated DESC",
]
} )
response = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
--------------- End Script ------------------
Result is some formated JSON but no data on the JQL results.
Any Help is appreciated.