Hello guys!
I'm trying to attach a temporary file on a request by using SD API but I keeping getting this error: STATUS 400 "No attachments found".
I'm testing with Insomnia, here is my code:
var axios = require("axios").default;
var options = {
method: 'POST',
url: 'https://test.atlassian.net/rest/servicedeskapi/servicedesk/1/attachTemporaryFile',
headers: {
Accept: 'application/json',
'X-Atlassian-Token': 'no-check',
'Content-Type': 'multipart/form-data; boundary=--------------------------335922374049255354550076',
Authorization: 'Basic'
},
data: 'Y29uc3QgYXhpb3MgP..........................................
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
Note: if i remove the code 'boundary =....' I getting the error: "Status 500 no multipart boundary was found"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.