I am attempting to create a Jira Issue from the confluence user macro. In this macro I am using jQuery to post to my Jira Instance. I am using the application links to do this and when I do I get a 411 error (length required).
var baseUrl = "https://www.my-confluence.co.uk/plugins/servlet/applinks/proxy?appId=MY_ID_NUMBER&path="
var createIssue = "https://www.my-jira..co.uk/rest/api/2/issue";
var datos = {
"fields": {
"project":
{
"key": "TEST"
},
"summary": "Test Ticket",
"reporter": "me.name",
"issuetype": {
"name": "Task"
},
}
};
var parameters = JSON.stringify(datos);
jQuery.ajax({
url: baseUrl + createIssue,
type: 'POST',
dataType: 'json',
contentType: 'application/json',
data: parameters ,
processData: false,
async: false,
success: function (data) {
alert(JSON.stringify(data));
},
error: function(error){
alert(JSON.stringify(error));
}
});
I have tried many things to try to get this to work. I have use just basic authentication instead of the application link and that also does not work, however it raises a different error to 411. Any help would be greatly appreciated.