吉拉卷曲获得问题

tho*_*der 2 curl jira

我正在尝试使用curl在jira服务器中获取数据。我试过这个命令

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

它在curl目录中下载了一个文件,文件显示

{“ errorMessages”:[[“ JQL查询中的错误:查询结束前应包含期望的运算符。有效的运算符为'=','!=','<','>','<=','> =','〜','!〜','IN','NOT IN','IS'和'IS NOT'。“]”“错误”:{}}

我尝试将创建的> =“ 2015-11-18”放入Jira Web界面的高级搜索中,并且可以正常工作。为何卷曲失败?

Som*_*era 5

您需要对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"
Run Code Online (Sandbox Code Playgroud)