Create an issue with Rest API

Saba Ghani June 8, 2021

Hi I'm trying to create bulk of issues, using file upload in postman and getting this error.
I can import/ export manually so permission thing is out of question.
I am getting error saying
"the issue doesn't exist or I dont' have a permission?
The URL I'm using is https://url/rest/api/latest/issue/Proect- id/attachments

2 answers

0 votes
Ravi Sagar _Sparxsys_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 2021

Hi @Saba Ghani 

The end point is /rest/api/3/issue and method should be POST with the correct JSON body.

This page has details.

How are you planning to create issues in bulk? You will have to write a script in your favourite programming language to do that and read the issues' data from somewhere like a csv file or another tool.

For attachments you will have to do make another rest call when the issue is created.

I hope it helps.

Ravi

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 8, 2021

With postman you can actually loop over a csv So I'm assuming Saba is doing that.

But indeed, I think the endpoint is not right.

Saba Ghani June 10, 2021

Aw- Thanks I have got your point and resolved my issue in postman. 

0 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 8, 2021

Hi Saba, welcome the the Atlassian Communinty!

Can you clarify what you're trying to do exactly? Are you trying to add attachments?

The proper endpoint would be  /rest/api/3/issue/{issueIdOrKey}/attachments. You shouldn't use project id. Attachments are added to individual issues o use the issue id instead.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events