我已经通过文档here,据此我为JIRA创建了一个问题。我知道我犯了一些非常小的错误。 我试图从命令行创建一个新的JIRA请求(后来我将在我的java代码中集成) 从我的Mac终端我试图运行:
curl -D- -u username:password -X POST --data {"fields":{"project":{"key": “PROJECTKEY"},"summary": "REST ye merry gentlemen.","description": "Creating of an issue using project keys and issue type names using the REST API","issuetype": {"name": "Bug"}}} -H "Content-Type: application/json" https://mycompanyname.atlassian.net/rest/api/2/issue/
我认为这与"数据"有关。 提前致谢。该示例来自文档链接本身。
输出:我的终端没有任何内容,没有错误,没有预期的输出。
PROJECTKEY取自我DASHBOARD中All Project列表中的KEY列。
答案 0 :(得分:5)
关闭了两件事:
“PROJECTKEY"
更改为"PROJECTKEY"
这应该有效:
curl -D- -u username:password -X POST --data '{"fields":{"project":{"key": "PROJECTKEY"},"summary": "REST ye merry gentlemen.","description": "Creating of an issue using project keys and issue type names using the REST API","issuetype": {"name": "Bug"}}}' -H "Content-Type: application/json" https://mycompanyname.atlassian.net/rest/api/2/issue/