A fully working example for intellij-http-client to create a jira issue including jira-xray extension.
Two option will likely be different
- the url path
/<-option-jira>/ could be non existing on your server
- the customfield number from
customfield_10228 will likely be different or you do not have it at all if your installation does not have jira-xray
### Create Issue as Test with steps the option-jira may be NULL in your setup
POST https://exmple.com/<-option-jira>/rest/api/2/issue/
Authorization: Bearer <your_token>
Content-Type: application/json
{
"fields": {
"project": { "key": "XAMPL" },
"summary": "Create Jira Issue per REST",
"components": [{"name": "Xampl"}],
"description": "Creating issue with project key & issue type
using the REST API",
"issuetype": { "name": "Test" },
"customfield_10228":{
"steps":[
{ "index":1,
"fields":{ "action":"Step 1",
"data":"input Data 1",
"expected result":"Excepted result 1"} },
{ "index":2,
"fields":{ "action":"Step 2",
"data":"input Data 2",
"expected result":"Excepted result 2" } },
{ "index":3,
"fields":{ "action":"Step 4",
"data":"input Data 3",
"expected result":"Excepted result 3" } }
]
}
}
}