Forum Discussion

Ring_Test's avatar
Ring_Test
Contributor
5 years ago

BULK Data API issue : unable to get output .

A week before I was aple to pull data from BUlk data api with basic ajax call

var connectionUri = 'Community URL?fromDate=20200427&toDate=20200428'
var dataToReturn = [];

var xhr = $.ajax({
url: connectionUri,
dataType: 'json',
headers : {
'client-id':client_id
},
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", "Basic " + btoa(username + ":" + password ));
xhr.setRequestHeader ("Accept","application/json");
//xhr.setRequestHeader ("Content-Disposition","attac");

},
success: function (json) {

 

Now I am getting error as

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at BULK DATA URL. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

 

Also when i tested this in post master i get this as output : SyntaxError: JSON.parse: unexpected keyword at line 1 column 1 of the JSON data

 

One observation though I was getting CSV output when i requested the bulk data api . Now the content seems to have changed.

Please let us know if anything has changed at source and do we need to handle code accordingly

4 Replies

  • hI, not sure if this related or not..previouly my python script working when downloading the bulk data. but now its not working as per normal. Its been 2 days now.  the downloaded CSV is filled with HTML below

    <html>
    <head><title>503 Service Temporarily Unavailable</title></head>
    <body bgcolor="white">
    <center><h1>503 Service Temporarily Unavailable</h1></center>
    </body>
    </html>
  • tyw's avatar
    tyw
    Boss
    5 years ago

    We've been encountering bulk data API issues for a few days now as well 

    If you haven't already submit a ticket! 

  • PrernaR's avatar
    PrernaR
    Khoros Alumni (Retired)
    5 years ago

    Apologies for the delayed response on this. The RCA was identified in early June, as an issue with the internal loadbalancer endpoints. This has since been fixed.