jira restful API

jira官方提供很全面的介绍,参考地址:https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials

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改成相应的值就行了

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,265评论 19 139
  • Correctness AdapterViewChildren Summary: AdapterViews can...
    MarcusMa阅读 12,886评论 0 6
  • 一说到REST,我想大家的第一反应就是“啊,就是那种前后台通信方式。”但是在要求详细讲述它所提出的各个约束,以及如...
    时待吾阅读 8,828评论 0 19
  • 写在前面 在我的旅行计划中,应该暂时排不到港澳的。 有一天突发奇想去办护照,顺带着办了港澳通行证,待拿到证后发现只...
    莫小葵阅读 1,400评论 0 2
  • 文|清韵 图|网络 “从没见过像松子这样一点不安、迷惘都没有的,只是盲目的活着。” “人生的价值,不在于得到什么,...
    清韵难敲阅读 3,982评论 0 1

友情链接更多精彩内容