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.
解决方案
You want to integrate JIRA into Eclipse?
You want a custom application to create tickets automagically?
Probably you'll need a REST client using the jersey-client artifact, I think this is the easiest way.
Firstly, check out the REST API documentation: https://docs.atlassian.com/jira/REST/latest/
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.
You can find an example here: http://pastebin.com/JeucUZNG