Hello!!
I'm making a call to the Atlasian service to attach a file to a ticket, but I can't get it to do it correctly.
This is the data I am sending:
Url: https://myDomain/rest/api/2/{myTicket}/attachments

The headers i send are these:

I used SpringBoot and feignClient and the error it is giving is:
Error statys: 500
Message: the request was rejected because no multipart boundary was found
Does anyone khnow how to resolve this error??
Thanks!!!!
I have found the solution :) I needed to modify the call this way:
@PostMapping(value = "/rest/api/2/issue/{issueIdOrKey}/attachments", consumes = "multipart/form-data")
Response attachFile(@RequestPart("file") MultipartFile file,
@PathVariable("issueIdOrKey") String issueIdOrKey,
@RequestHeader("Authorization") String authorization,
@RequestHeader Map<String, String> headers);
and configure the headers like this:
final Map<String, String> headers = new HashMap<>();
headers.put(ACCEPT, MediaType.MULTIPART_FORM_DATA_VALUE);
headers.put(X_ATLASSIAN_TOKEN, NO_CHECK);
HI @ese_tio
Welcome
Check community post: https://community.atlassian.com/t5/Jira-questions/How-to-send-attachement-uing-Jira-Rest-API/qaq-p/1927804
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.