简体   繁体   English

吉拉卷曲获得问题

[英]jira curl to get issues

I am trying to get data in jira server using curl. 我正在尝试使用curl在jira服务器中获取数据。 I tried this command 我试过这个命令

    curl -u username:password -X GET -H "Content-Type: application/json" jiraServer/rest/api/2/search?jql=created >= "2015-11-18"

It downloaded a file in the curl directory and the file says 它在curl目录中下载了一个文件,文件显示

{"errorMessages":["Error in the JQL Query: Expecting operator before the end of the query. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'."],"errors":{}} {“ errorMessages”:[[“ JQL查询中的错误:查询结束前应包含期望的运算符。有效的运算符是'=','!=','<','>','<=','> =','〜','!〜','IN','NOT IN','IS'和'IS NOT'。“]”“错误”:{}}

I tried put the created >= "2015-11-18" in advanced search in Jira web interface and it works. 我尝试将创建的> =“ 2015-11-18”放入Jira Web界面的高级搜索中,并且可以正常工作。 Don't why it failed in curl? 为何卷曲失败?

您需要对URL进行编码并用引号引起来:

curl -u username:password -X GET -H 'Content-Type: application/json' "http://jiraServer/rest/api/2/search?jql=created%20>%3D%202015-11-18"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM