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?
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.
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.
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.
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?
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
Thanks for the clarification Azwan.
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 :)
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
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.
Thanks for the clarification Azwan. That's all I wanted. :)
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