public static Result restDashboardSummaries() {

    long now = System.currentTimeMillis();
    long finishDate = now - DAY;

    //Update statistics only after FETCH_DELAY
    if (now - _lastFetch > FETCH_DELAY) {
      _numJobsAnalyzed = AppResult.find.where()
          .gt(AppResult.TABLE.FINISH_TIME, finishDate)
          .findRowCount();
      _numJobsCritical = AppResult.find.where()
          .gt(AppResult.TABLE.FINISH_TIME, finishDate)
          .eq(AppResult.TABLE.SEVERITY, Severity.CRITICAL.getValue())
          .findRowCount();
      _numJobsSevere = AppResult.find.where()
          .gt(AppResult.TABLE.FINISH_TIME, finishDate)
          .eq(AppResult.TABLE.SEVERITY, Severity.SEVERE.getValue())
          .findRowCount();
      _numJobsModerate = AppResult.find.where().gt(AppResult.TABLE.FINISH_TIME, finishDate)
          .eq(AppResult.TABLE.SEVERITY, Severity.MODERATE.getValue())
          .findRowCount();
      _numJobsLow = AppResult.find.where().gt(AppResult.TABLE.FINISH_TIME, finishDate)
          .eq(AppResult.TABLE.SEVERITY, Severity.LOW.getValue())
          .findRowCount();
      _numJobsNone = AppResult.find.where().gt(AppResult.TABLE.FINISH_TIME, finishDate)
          .eq(AppResult.TABLE.SEVERITY, Severity.NONE.getValue())
          .findRowCount();
      _lastFetch = now;
    }

    JsonObject dashboard = new JsonObject();
    dashboard.addProperty(JsonKeys.ID, "dashboard");
    dashboard.addProperty(JsonKeys.TOTAL, _numJobsAnalyzed);
    dashboard.addProperty(JsonKeys.CRITICAL, _numJobsCritical);
    dashboard.addProperty(JsonKeys.SEVERE, _numJobsSevere);
    dashboard.addProperty(JsonKeys.MODERATE, _numJobsModerate);
    dashboard.addProperty(JsonKeys.LOW, _numJobsLow);
    dashboard.addProperty(JsonKeys.NONE, _numJobsNone);
    JsonObject parent = new JsonObject();
    parent.add(JsonKeys.DASHBOARD_SUMMARIES, dashboard);

    return ok(new Gson().toJson(parent));
  }
Returns the json object for the dashboard summaries of jobs analzyed in last day.
app/controllers/api/v1/Web.java