Skip to content

Instantly share code, notes, and snippets.

@jadell
Created April 13, 2013 03:50

Revisions

  1. jadell created this gist Apr 13, 2013.
    13 changes: 13 additions & 0 deletions loggly_api.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    $.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
    });