I want to attach an API key to my URL to give access to the database, the problem is attaching it to the filename
var pivot = new WebDataRocks({
container: "#wdr-component",
toolbar: true,
report: {
dataSource: {
filename: "https://testing-195b.restdb.io/rest/customerdata"
}
}
});
this code worked for the console
var settings = {
"async": true,
"crossDomain": true,
"url": "https://testing-195b.restdb.io/rest/customerdata",
"method": "GET",
"headers": {
"content-type": "application/json",
"x-apikey": "60c8b39ee2c96c46a2463581",
"cache-control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});