我正在尝试使用v2 rest API创建Jira服务台项目问题。我正在传递所有必填字段值,但Jira抛出以下错误。
responseStatusCode:400
{
"errorMessages": [
"Service: Service is required."
],
"errors": {}
}
共享下面的数据,
发送用于创建服务台事件的数据,
{
"fields": {
"project": {
"key": "GSD"
},
"issuetype": {
"name": "Incident"
},
"customfield_10402": "test",
"customfield_12608": {
"id": "15300"
},
"summary": "Test Ticket Please ignore - Jira Testing",
"description": "this is description"
}
}
其中 customfield_10402 是 string 字段,而 customfield_12608 是下拉字段。
项目详细信息:
"projectCategory": {
"self": "https://domain.atlassian.net/rest/api/2/projectCategory/10400",
"id": "10400",
"name": "Service Desks",
"description": "Customer facing service desk containers, sitting behind single support portal site"
},
"projectTypeKey": "service_desk",
"simplified": false,
"style": "classic",
"isPrivate": false,
"properties": {}
答案 0 :(得分:0)
我相信上面的请求结构用于创建Jira问题。
您正在寻找的是创建服务台请求。
Jira Service Desk的创建应类似于以下示例
{
"serviceDeskId": "10",
"requestTypeId": "25",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new mouse for my Mac"
},
"requestParticipants": [
"john"
]
}
请在此处找到更多信息 JIRA Service Desk REST API Reference