I am trying to use the JIRA REST API to create/update issue types(Specifically Test type). I've seen multiple questions around this here but none are answering this for me. On running the Curl command: curl -H "Content-Type: application/json" -X POST --data @techoneway.json -u admin:xxxxxxx http://myserver/rest/api/2/issue
We get the error: {"errorMessages":[],"errors":{"issuetype":"valid issue type is required"}}
I've tried every combination of issuetype name/id and project key/id and other Issue types to no avail. I've tried with the 'id' number as well. The info for ids I got from using the XML of an existing Test issue type using the export XML button to check the fields ID numbers.
The json file is below taken pretty much line for line from the JIRA REST API examples tutorial just updating with our own customfields. I think I'm missing something really obvious at this stage and cannot see it!
Appreciate any help. Thanks
Using the following Json:
{
"fields": {
"project":
{
"key": "ABCDEFG"
},
"summary": "Unused Test case",
"description": "example of manual test",
"issuetype": {
"name": "Test"
},
"customfield_000001": { "customfieldvalue": "Manual" },
"customfield_000002": {
"steps": [
{
"index": 0,
"step": "Step 1",
"data": "input Data 1",
"result": "Expected result 1"
}
]
}
}
}