code: func intervalActionByIdHandler(w http.ResponseWriter, r *http.Request) {
  	if r.Body != nil {
  		defer r.Body.Close()
  	}
  
  	// URL parameters
  	vars := mux.Vars(r)
  	id, err := url.QueryUnescape(vars["id"])
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusBadRequest)
  		LoggingClient.Error("Error un-escaping the value interval id: " + err.Error())
  		return
  	}
  
  	switch r.Method {
  	case http.MethodGet:
  		intervalAction, err := getIntervalActionById(id)
  		if err != nil {
  			switch x := err.(type) {
  			case *errors.ErrIntervalActionNotFound:
  				http.Error(w, x.Error(), http.StatusNotFound)
  			default:
  				http.Error(w, x.Error(), http.StatusInternalServerError)
  			}
  			LoggingClient.Error(err.Error())
  			return
  		}
  		encode(intervalAction, w)
  		// Post a new Interval Action
  	case http.MethodDelete:
  		if err = deleteIntervalActionById(id); err != nil {
  			switch err.(type) {
  			case *errors.ErrIntervalActionNotFound:
  				http.Error(w, err.Error(), http.StatusBadRequest)
  				return
  			default:
  				http.Error(w, err.Error(), http.StatusInternalServerError)
  				return
  			}
  		}
  		w.Header().Set("Content-Type", "application/json")
  		w.WriteHeader(http.StatusOK)
  		w.Write([]byte("true"))
  	}
  }
docs: /*
  Handler for the IntervalAction By-ID API
  Status code 404 - interval not found
  Status code 500 - unanticipated issues
  api/v1/interval
  */