网址:http://localhost:8080/rest/api/2/issue
body:
{
"fields":
{
"project":
{
"key": "DEMO"
},
"Epic Name": "Epic Name 01",
"summary": "REST EXAMPLE1",
"description":"Creating an Epic via REST",
"issuetype":
{
"name": "Epic"
}
}}
发布于 2020-03-22 21:23:20
如果没有指定Content-type,Jira将返回415 Unsupported Media Type。
添加到您的标题中:
Content-Type: application/json我试过了,它起作用了:
{
"fields": {
"summary": "REST ye merry gentlemen.",
"description": "Creating of an issue using project keys and issue type names using the REST API",
"customfield_10104": "Epic Name 01",
"issuetype": {
"name": "Epic"
},
"project":
{
"key": "JIRA"
}
}
}如果你想创建一个带有"Epic Name“的问题,你应该使用它的自定义字段ID来引用它。
要获取"Epic Name“customfield id:使用以下rest:
http://localhost:2990/jira/rest/api/2/customFields?search=Name%20of%20Epichttps://stackoverflow.com/questions/60792105
复制相似问题