首页 > 数据库技术 > 详细

Access Jira RESTful API by cURL

时间:2015-07-14 20:19:15      阅读:333      评论:0      收藏:0      [点我收藏+]

*******INSTRUCTION FOR GETING RECORDS FROM JIRA by cURL*****************
Jira supply RESTfull API, so we can use cURL to get data. Below is the steps,
1. Install cURL;
2. Use curl to send a Http GET request, the command is as below,(1k records per request);
curl -D- -o c:/jiratest.txt -u username:password -X GET -H "Content-Type: application/json" http://10.255.7.140:8080/rest/api/2/search?jql="key>CM-7266&maxResults=1000"
3. Edit c:/jiratest.txt, to remove the header and separater(,)
4. Create DB & Collection (jira.jiratest),
   > show databases;
   jira   0.203GB
   local  0.078GB
   > use jira
   switched to db jira
   > show collections;
   jiratest
   system.indexes
   >
   
5. Importing the JSON to Mongodb with below command;
mongoimport -d jira -c jiratest c:/jiratest.txt
6. Done.






Access Jira RESTful API by cURL

原文:http://www.cnblogs.com/ECNB/p/4646333.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!