如何使用其余api(java)在jira中创建问题? [英] how to create an issue in jira using the rest api (java)?

查看:137
本文介绍了如何使用其余api(java)在jira中创建问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用rest api在jira中创建问题.我已经尝试过使用curl的示例.但是我需要使用java和rest api在eclipse中创建缺陷.

How to create issue in jira using the rest api. I have tried the examples using curl. But I need to create defect in eclipse using java and rest api.

推荐答案

您要将JIRA集成到Eclipse中吗?

请参阅: https://confluence.atlassian. com/display/IDEPLUGIN/Workingwithwith + JIRA + Issues + in + Eclipse

可能您需要使用jersey-client工件的REST客户端,我认为这是最简单的方法.

Probably you'll need a REST client using the jersey-client artifact, I think this is the easiest way.

首先,查看REST API文档: https://docs.atlassian.com/jira/REST/最新/

Firstly, check out the REST API documentation: https://docs.atlassian.com/jira/REST/latest/

使用POST方法,您可以将表示想要发出问题的JSON对象推送到JIRA服务器.您只需要完全知道可以填写哪些字段即可.如果发送的字段不在创建问题"屏幕上,或者是必填字段,但未指定,则将收到错误消息.

With the POST method you can push a JSON object depiciting a wannabe issue to the JIRA server. You just have to exactly know what fields you can and should fill in. If you send fields that are not on the create issue screen, or is required but you haven't specified them, you'll get an error.

您可以在此处找到示例: http://pastebin.com/JeucUZNG

You can find an example here: http://pastebin.com/JeucUZNG

这篇关于如何使用其余api(java)在jira中创建问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆