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}/attachmentsThe headers i send are these:I used SpringBoot and feignClient and the error it is giving is:Error statys: 500Message: the request was rejected because no multipart boundary was foundDoes 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
Thanks @Marc -Devoteam- but it doesn't fit the technology I'm using
It looks like you're new here. Sign in or register to get started.