码迷,mamicode.com
首页 > 数据库 > 详细

Access Jira RESTful API by cURL

时间:2015-07-14 20:19:41      阅读:172      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!