Skip to content

Instantly share code, notes, and snippets.

@jadell
Created April 13, 2013 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadell/5376837 to your computer and use it in GitHub Desktop.
Save jadell/5376837 to your computer and use it in GitHub Desktop.
Ajax query of Loggly from jQuery
$.ajax("https://mydomain.loggly.com/api/facets/date/?q=my_search_criteria", {
// Don't send the _=timestamp query parameter
cache: true,
// Send HTTP auth credentials
username: api_readonly_username,
password: api_readonly_password,
// Use JSONP
dataType: "jsonp"
}).done(function(data) {
// handle data, probably a call to some graphing library
}).fail(function() {
// alert failure
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment