It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need help on attaching the file while creating the defect in JIRA using REST API

Hi All,

We have to explore the defects in JIRA.  We are able to consume the REST API shared by JIRA. defects are also getting logged. However, our requirement is to attach the file while exporting the issues to JIRA through REST API. However, based on the documentation, it seems that there is no provision for attaching the doc through REST API for Jira. Would like to confirm this. Is this really the case or please suggest how we can achieve this?

 

 

Regards,

Lokesh.

 

 

1 answer

0 votes
Warren Community Leader Dec 09, 2019

Hi @Lokesh Sharma 

I'm not sure where you got that information from, but I regularly use Jira's REST API to attach documents (images, PDFs, Word docs, Excel spreadsheets) to a ticket. The point to note is you can't do it at the same time as creating the ticket, so I use the API to create a ticket, which returns the key (ABC-123). I then use this key and another API call (POST) to attach document(s).

See the answer from Jeff Caron here for a C# implementation which is what I've used so I know that it works.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you