JIRA REST API cross domain call with jQuery

Deniss Alimovs February 11, 2013

I need to make a cross domain call to get a list of issues.

$.ajax({
type: 'GET',
url: 'https://XXXXXXX.atlassian.net/rest/auth/2/search?fields=summary',
dataType: 'jsonp'
}).done(function() {alert('Booya')});
I get the following error in Chrome
Uncaught SyntaxError: Unexpected token :

1 answer

1 accepted

1 vote
Answer accepted
Deniss Alimovs February 11, 2013

Turns out it requires a special jsonp name.

$.ajax({

url: 'https://[yourSubDomain].atlassian.net/rest/auth/2/[yourRequest],
dataType: 'jsonp',
jsonp: 'jsonp-callback'
});

Suggest an answer

Log in or Sign up to answer