Create Issue

/services/v2/jira/node/[node-id]/issue.json?addAttachments=true/false

- Query Params:
Add Attachments (type is boolean)

🚧

Permissions & Notes:

Make sure you have read the JIRA Integration Documentation in the Get Started, Integrations and Plugins Section before trying out the endpoint. There are specific steps and permissions needed to be able to see results from the endpoints in your AnswerHub instance.

Sample Request

A POST Create Issue request to create a JIRA ticket issue with the project name "DOC" and the issue type named "Bug" to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{ "fields": { "project": { "key": "DOC" }, "issuetype": { "name": "Bug" }} }' "https://apidocs.cloud.answerhub.com/services/v2/jira/node/535/issue.json?addAttachments=true"

Expected Response: HTTP 201 - Created

{
    "id": "69300",
    "key": "DOC-60",
    "self": "https://<JIRA HOST NAME>/rest/api/latest/issue/69300"
}

Community User Interface Result

Your Question (nodeId:535) will have a link to the created JIRA ticket and the status below the link

Request with a Node Already Linked to a JIRA Ticket

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{ "fields": { "project": { "key": "DOC" }, "issuetype": { "name": "Bug" }} }' "https://apidocs.cloud.answerhub.com/services/v2/jira/node/535/issue.json"

Expected Response: HTTP 400 - Bad Request

{
  "error":"The node has already been linked to a jira ticket"
}

Request with an Invalid Project-Key: "TESTING" or issuetype "BUGS"

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{ "fields": { "project": { "key": "TESTING" }, "issuetype": { "name": "Bug" }} }' "https://apidocs.cloud.answerhub.com/services/v2/jira/node/535/issue.json"

Expected Response: HTTP 400 - Bad Request

{
  "error":"Input is invalid, e.g. missing required fields, invalid field values"
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!