Find Questions…

Close ×
First time here? Check out the FAQ!

Creating new jira issue using RESTv4.3

Samuel Wayne asked this question · 36 karma ·

I'm trying to create a new jira issue using REST API v4.3. I can't find a solution for this in the documentation. Should i go to SOAP or REST has an option to do this?

890 views

2 Answers:

Gaurav Kohli · 186 karma ·

REST API don't support create issue option currently. REST API in Jira 5.0 would support that http://docs.atlassian.com/jira/REST/5.0-m4/#id435193 so currently you can only use SOAP to create a issue.

Samuel Wayne · 36 karma ·

Thanks Gaurav. I'm just starting with integrating JIRA in my system. For versions prior to v5, what do you suggest for remote systems.. SOAP or REST? I could see that the REST api is just evolving from version 5... Also the rest api documentation for version 4.3 and 4.4 does not have an exhaustive feature list.

Gaurav Kohli · 186 karma ·

Hi Samuel,

I would have suggested using REST api's, as I think REST should eventually replace SOAP API's, but if Issue creation is very important part of your integration then you don't have any option other than SOAP API's. Other thing which you can try is start integrating with REST API's of 5.0 as that would be released in next month or so.

·1 user liked this

Samuel Wayne · 36 karma ·

Thanks for the council Gaurav. Currently my requirement is to integrate with version 4.4 and earlier. But the documentations i found in https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+(Alpha)+Tutorial for version 4.4 is not so exhaustive. For example, there are no methods to get information about the projects and users which I believe are available in SOAP.

Also, as you suggested, If i start developing my application to integrate with REST API version 5.0, that should work well for earlier verions as well right?

Hanis Suhailah [Atlassian] · 4,337 karma ·

Hi Samuel :)

You were right about REST documentation is incomplete. Prior to 5.0, SOAP is recommended instead.

- Creating a SOAP Client

- How do i get more help with SOAP?

Samuel Wayne · 36 karma ·

Thanks Hanis. I was just playing around with the REST API v5. I created an evaluation account for jira-ondemand couple of days back and tried the following curl, when i got the creepy error. Can you please let me know what can be done for this..

The requested resource (/rest/api/2/issue/createmeta) is not available.

The curl command is curl -D- -u xxxx:xxx -X GET -H "Content-Type: application/json" https://company-name.atlassian.net/rest/api/2/issue/createmeta

Azwandi Mohd Aris [Atlassian] · 4,361 karma ·

Hi Samuel,

Currently, JIRA OnDemand is of version 4.4.1 - see this page. The method createmeta is only available in JIRA 5.0 REST API.

Azwan

·1 user liked this

Samuel Wayne · 36 karma ·

Thanks for the clarification Azwan.

Azwandi Mohd Aris [Atlassian] · 4,361 karma ·

No worries! If you wish to try out JIRA 5.0, you can try our Early Access Program - http://www.atlassian.com/software/jira/download-eap :)

Samuel Wayne · 36 karma ·

Sure Azwan :-) I have a small query on the rest url. How do i pass the session id in the below url to call the api methods. Right now, i'm just passing the credentials for playing around with api.

curl -u username:pwd https://company.atlassian.net/rest/api/2.0.alpha1/project/DEMO

Azwandi Mohd Aris [Atlassian] · 4,361 karma ·

Samuel Wayne · 36 karma ·

Yep. I got that point earlier. I just wanted to know how to use that cookie for subsequent requests. Is there a curl example for that.. After login the login cookie i get is JESSIONID. I just wanted to know how to use this. Thanks.

Azwandi Mohd Aris [Atlassian] · 4,361 karma ·

Oh, in that case, you can use "-b" parameter. E.g.:

curl -c cookie_jar -u username:password https://mydomain.atlassian.net/rest/auth/1/session

curl -b cookie_jar https://mydomain.atlassian.net/rest/api/2.0.alpha1/project

·1 user liked this

Samuel Wayne · 36 karma ·

Thanks for the clarification Azwan. That's all I wanted. :)

Azwandi Mohd Aris [Atlassian] · 4,361 karma ·

No worries!

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question