Error on REST API POST : Cookie Based Authentication "Unrecognized field "cookie" (Class com.atlassi

Seyed Ismail Mac
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 6, 2018

Hi Experts,

 

I am trying to build a web application to connect to JIRA with Cookie Based Authentication following this blog

 

1. I am able to generate session ID.

2. But when I use that session ID in below code, it throws following error:

 

 "Unrecognized field "cookie" (Class com.atlassian.jira.rest.v2.search.SearchRequestBean), not marked as ignorable↵ at [Source: org.apache.catalina.connector.CoyoteInputStream@512e6427; line: 1, column: 12] (through reference chain: com.atlassian.jira.rest.v2.search.SearchRequestBean["cookie"])"

 

 

$.ajax({

url: 'https://jira.seaco.com/rest/api/2/search',
dataType: 'json',
method: 'POST',
contentType: "application/json",
jsonp: 'jsonp-callback',
crossDomain: true,
data: JSON.stringify({
"cookie" : "JESESSIONID="D60BAF35B328C4F6095DFA847952A911"
}), success: function(response) {
debugger;
},
error: function(error) {}

 

 

Any idea why? Thank you in advance.

 

Best Regards,

Seyed Ismail.

});

0 answers

Suggest an answer

Log in or Sign up to answer