I was able to successfully query the API and get a jsonp response just fine with the following code until it stopped working all of a sudden:
$.ajax({ type: "GET", url: "https://myurl.jira.com/rest/api/latest/search?jql=project=projname&jsonp-callback=cb", contentType: "application/javascript; charset=utf-8", dataType: "jsonp", success: function (data) { }, error: function (errormessage) { } }); function cb(data){ //do stuff }
The response is a regular json object and not javscript, i.e., cb({json})
Because of this, I'm getting the syntaxError invalid label. Did something change with the API in
the last 24 hours?
I also tried the even more basic approach:
$.getJSON("https://xxxxxxx.jira.com/rest/api/latest/issue/xxx-xx?jsonp-callback=?", function(data) { console.log(data); });
And I get a SyntaxError: invalid label message in the console because it seems like the response is not being wrapped in a callback function but is sent as a straight json response.
Community moderators have prevented the ability to post new answers.
We have disabled this functionality for security reasons across all OnDemand instances. You could wait until the plugin is fixed with more security features, or you can log a support ticket if you really need this re-enabled but you should be aware of the security risk as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This should be fixed late February or March, but I can't say for certain,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well it's late May now... still nothing. Just implement basic CORS support and that would replace all JSONP functionaity. All you need to do is return the contents of the "Origin" header as "Access-Control-Allow-Origin" on any request you originally had JSONP support on. It's even easier to implement than JSONP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hate to be the bearer of bad news ... but unfortunately support will not be able to enable this functionality at this time.
Best we can offer is to keep watching https://jira.atlassian.com/browse/JRA-30371- please consider including any comments you might as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was there any notice that this was being removed? We have several apps that use the API (including JSONP) for analysis and they're currently dead in the water.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our scans found that very, very few customers were using this functionality. We determined the most prudent course of action would be to provide a way for us to re-enable it (in the short-term) on a per-customer basis and rely on customers contacting Support when they discovered the functionality stopped working. (You can still do this now.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What will be "going away"? The entire REST API on On-Demand instances, or just the JSONP part of it?
What alternative methods exist to programmatically pull data from on On-Demand instance?
Garreth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just the JSONP part of it. The recommended alternative method is to use OAuth (see an example doc and some other examples). We are also looking at CORS, although this is not complete yet (e.g. JRA-30371).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The applications are being updated to remove JSONP callbacks (replacing them with alternative mechanisms that are more secure). As mentioned above, you can contact Support and ask for them to be re-enabled for now as a stop-gap, but eventually it will be going away. It would be worth looking into utilising one of these alternative methods to replace any of your systems currently using this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.