Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API - Create issue API sometimes returns no result

Ratna August 15, 2021

Hello, I am trying to create JIRA Issue by using this API request in Go:  

POST /rest/api/3/issue, and save the issue key from the API response to my database.

Sometimes, the REST API response shows no results so I could not save the issue key to the database, but actually, the issue exists in JIRA. What is the reason for this?

 

1 answer

0 votes
Alex Koxaras -Relational-
Community Champion
August 15, 2021

What response do you get from the request?

Ratna August 15, 2021

I'm not sure how the response exactly looks like. It's hard for me to reproduce it because that problem just happens sometimes. When it happens, the issue key is null or empty string but no error is returned. So I think, the response would look like this  

 

{

“id” : “”,

“key”: “”,

“fields”: {

}

..

}

Alex Koxaras -Relational-
Community Champion
August 15, 2021

@Ratna 

If you read this documentation (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post) you will see that this request have certain responses. E.g. 201 means that the request was succesful:

responses.png

So what is the response of your request?

Ratna August 15, 2021

201, since the issue was created successfully

Suggest an answer

Log in or Sign up to answer