code: func (s *APIServer) searchEvents(auth ClientI, w http.ResponseWriter, r *http.Request, p httprouter.Params, version string) (interface{}, error) {
  	var err error
  	to := time.Now().In(time.UTC)
  	from := to.AddDate(0, -1, 0) // one month ago
  	query := r.URL.Query()
  	// parse 'to' and 'from' params:
  	fromStr := query.Get("from")
  	if fromStr != "" {
  		from, err = time.Parse(time.RFC3339, fromStr)
  		if err != nil {
  			return nil, trace.BadParameter("from")
  		}
  	}
  	toStr := query.Get("to")
  	if toStr != "" {
  		to, err = time.Parse(time.RFC3339, toStr)
  		if err != nil {
  			return nil, trace.BadParameter("to")
  		}
  	}
  	var limit int
  	limitStr := query.Get("limit")
  	if limitStr != "" {
  		limit, err = strconv.Atoi(limitStr)
  		if err != nil {
  			return nil, trace.BadParameter("failed to parse limit: %q", limit)
  		}
  	}
  	// remove 'to', 'from' and 'limit' fields, passing the rest of the query unmodified
  	// to whatever pluggable search is implemented by the backend
  	query.Del("to")
  	query.Del("from")
  	query.Del("limit")
  	eventsList, err := auth.SearchEvents(from, to, query.Encode(), limit)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	return eventsList, nil
  }
docs: // HTTP GET /:version/events?query
  //
  // Query fields:
  //	'from'  : time filter in RFC3339 format
  //	'to'    : time filter in RFC3339 format
  //  ...     : other fields are passed directly to the audit backend