Hi,
How can I create an attachment in Jira using rest API and can anyone share the code sample using Javascript?
I have tried both the endpoint below mentioned while using this I'm getting XSRF check failed error.
1) https://konnectify-jira-integration.atlassian.net/rest/api/3/issue/PRJ2-95/attachments
2) https://konnectify-jira-integration.atlassian.net/rest/api/2/issue/PRJ2-95/attachments
Thanks in advance.
Hi @Nagamanickam ,
I'm using the "Jira Cloud platform REST API" collection from postman.
Adding a attachment using the API from that collection worked correctly. Adding the CURL for the same:
curl --location 'https://<sitename>.atlassian.net/rest/api/3/issue/<issueKey>/attachments' \--header 'Content-Type: multipart/form-data' \--header 'Authorization: Basic <Token>' \--form '0=@<LocalFile Path>'
Another link I found that may help : https://community.atlassian.com/t5/Jira-questions/xsrf-check-failed-when-create-jira-ticket-via-rest-api/qaq-p/1256085#M397962
It looks like you're new here. Sign in or register to get started.