Dear Community,
I'm looking to create the issue from Python script with the below coding. Our's JIRA is on AWS.
Then script is returning the error message as below. Does any one experienced access JIRA from Python script?
{"errorMessages":["Can not deserialize instance of com.atlassian.jira.rest.v2.issue.IssueUpdateBean out of START_ARRAY token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@7edec606; line: 1, column: 1]"]}
The coding is here.
#
# Script to create the JIRA Story based on the Issue Key
#
import requests
import json
from wsgiref import headers
from pip._internal.network import auth
import JIRAonAWSRestAPI
def main():
url="https://jira.companyname.com/rest/api/2/issue"
username="ouruser"
password="ourpassword"
myheaders= {'Content-type':"application/json" , 'Accept':"application/json"}
payload=[
{
"fields": {
"summary": "TEST JIRA Issue in for JIRA on AWS ",
"issuetype": {
"id": "10001"
},
"project": {
"key": "ITD"
},
"assignee": {
"name": "ourusername"
},
"components": [
{
"name": "SALES"
}
],
"customfield_10302": "2021-07-28",
"customfield_10301": 16 ,
"customfield_10303": {
"id": "10666"
}
}
}
]
response = requests.post(url, data=json.dumps(payload), headers= myheaders, auth=(username, password))
print(response.text)
if(__name__ == "__main__"):
main()
Regards,
Praveen
Hi,
I got the correct info from the existing question in the community that the standalone documentation alone from atlassian for python script
https://atlassian-python-api.readthedocs.io/index.html . I will refer that.
Regards,
Praveen
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.