This is the error I am getting when I am trying to create a project.
"errorMessages": [],
"errors": {
"project": "project is required"
}
code That I have used.
# This code sample uses the 'requests' library:# http://docs.python-requests.orgimport requestsfrom requests.auth import HTTPBasicAuthimport json
url = "https://rasateam.atlassian.net/rest/api/3/issue/"
auth = HTTPBasicAuth("<MYUSERID>", "<APITOKEN>")
headers = { "Accept": "application/json", "Content-Type": "application/json"}
payload = json.dumps( { "update": {}, "fields": { "summary": "Creating first ticket from API" #"parent": { # "key": "RASA" }, "issuetype": { "id": "10000" }, "components": [ { "id": "10000" } ], #"customfield_20000": None, #"customfield_40000": None, #"customfield_70000": None, "project": { "id": "10000", "key": "RASA", "name": "RASASLACKBOT", "projectTypeKey": "software", "self": "https://rasateam.atlassian.net/rest/api/3/project/10000", #"simplified": false }, "description": None, "reporter": { "id": "5f362439fdc3f5003f7fd882" }, "fixVersions": [], #"customfield_10000": "{}", "priority": { "id": "3" }, "labels": [ "bugfix", "blitz_test" ], #"timetracking": { # "remainingEstimate": "5", #"originalEstimate": "10" #}, #"customfield_30000": None, #"customfield_80000": None, #"security": None, #"environment": { # "type": "doc", #"version": 1, #"content": [ # { # "type": "paragraph", # "content": [ # { # "text": "UAT", # "type": "text" #} #] #} #] #}, #"versions": [ #{ #"id": "10000" # } # ], #"duedate": "2019-05-11", #"customfield_60000": "jira-software-users", #"customfield_50000": { # "type": "doc", #"version": 1, #"content": [ # { # "type": "paragraph", # "content": [ # { # "text": "Could impact day-to-day work.", # "type": "text" #} #] #} #] #}, "assignee": { "id": "5b109f2e9729b51b54dc274d" } } )
response = requests.request( "POST", url, data=payload, headers=headers, auth=auth)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))