api.compute_aggregate = function(repo, table, agg_type, col_name, callback) {
  var url = url_base + "aggregate/" + repo + "/" + table + "/" + agg_type + "/" + col_name + "/";
  $.get(url, function(aggregate_result) {
    if (aggregate_result.success) {
      callback(null, aggregate_result.value);