The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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'
});
TAGS
AUG Leaders

Atlassian Community Events