如何通过rest api在jira中创建问题? [英] how to create an issue in jira via rest api?
本文介绍了如何通过rest api在jira中创建问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用REST API在jira中创建问题?我没有在文档中找到此信息(没有发布POST的问题),但我怀疑这是可能的.
Is it possible to create an issue in jira using REST api? I didn't find this in the documentation (no POST for issues), but I suspect it's possible.
wget或curl的示例会很好.
A wget or curl example would be nice.
推荐答案
POST到此URL
POST to this URL
https://<JIRA_HOST>/rest/api/2/issue/
此数据:
{
"fields": {
"project":
{
"key": "<PROJECT_KEY>"
},
"summary": "REST EXAMPLE",
"description": "Creating an issue via REST API",
"issuetype": {
"name": "Bug"
}
}
}
收到的答案将是您的问题的ID和密钥:
In received answer will be ID and key of your ISSUE:
{"id":"83336","key":"PROJECT_KEY-4","self":"https://<JIRA_HOST>/rest/api/2/issue/83336"}
别忘了授权.我使用的是HTTP-Basic.
Don't forget about authorization. I used HTTP-Basic one.
这篇关于如何通过rest api在jira中创建问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文