1
0
-1

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?

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      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.

      1. samuelwayne0

        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.

      2. gaurav.in

        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.

      3. samuelwayne0

        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?

      CommentAdd your comment...
    2.  
      1
      0
      -1

      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?

      1. samuelwayne0

        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

      2. Azwandi Aris [Atlassian]

        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

      3. samuelwayne0

        Thanks for the clarification Azwan.

      4. Azwandi Aris [Atlassian]

        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 :)

      5. samuelwayne0

        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

      6. samuelwayne0

        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.

      7. samuelwayne0

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

      8. Azwandi Aris [Atlassian]

        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

      CommentAdd your comment...