jira php rest api,jira restful API

1: Authentication :关于登录jira提供三种方式,用java 封装的 Basic Authentication实现的;具体实现方式,java的实现方式可以参考 https://github.com/rcarz/jira-client/issues

2: create issue: 先要通过http://jira.~~.xx.com//rest/api/2/JFL/createmeta 找到对应问题的,可以找到服务器中所有jira project的基本属性,找到你要编辑的jira project的key和id;然后通过 例如:curl -D- -u fred:fred -X POST --data {see below} -H "Content-Type: application/json" http://localhost:8090/rest/api/2/issue/ ;post数据json的数据如下:

{

"fields": {

"project":

{

"key": "TEST"

},

"summary": "REST ye merry gentlemen.",

"description": "Creating of an issue using project keys and issue type names using the REST API",

"issuetype": {

"name": "Bug"

}

}

}

3: Update issue: 通过 jira.xx.com/rest/api/2/issue/JFL-89/editmeta ,可以找到该issue哪些fields可以update;然后通过 例如 : curl -D- -u fred:fred -X PUT --data {see below} -H "Content-Type: application/json" http://kelpie9:8081/rest/api/2/issue/QA-31 json字符串:

{

"fields": {

"assignee":{"name":"harry"}

}

}

注意:如果是自定义的fileld(customfield_10200,这个值可以通过editmeta方式得到),将assignee改成相应的值就行了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值