code: func restAddDeviceReport(w http.ResponseWriter, r *http.Request) {
  	defer r.Body.Close()
  	var dr models.DeviceReport
  	if err := json.NewDecoder(r.Body).Decode(&dr); err != nil {
  		LoggingClient.Error(err.Error())
  		http.Error(w, err.Error(), http.StatusBadRequest)
  		return
  	}
  
  	// Check if the device exists
  	if _, err := dbClient.GetDeviceByName(dr.Device); err != nil {
  		if err == db.ErrNotFound {
  			http.Error(w, "Device referenced by Device Report doesn't exist", http.StatusNotFound)
  		} else {
  			http.Error(w, err.Error(), http.StatusInternalServerError)
  		}
  		LoggingClient.Error(err.Error())
  		return
  	}
  
  	// Add the device report
  	var err error
  	dr.Id, err = dbClient.AddDeviceReport(dr)
  	if err != nil {
  		if err == db.ErrNotUnique {
  			http.Error(w, "Duplicate Name for the device report", http.StatusConflict)
  		} else {
  			http.Error(w, err.Error(), http.StatusInternalServerError)
  		}
  		LoggingClient.Error(err.Error())
  		return
  	}
  
  	// Notify associates
  	if err := notifyDeviceReportAssociates(dr, http.MethodPost); err != nil {
  		LoggingClient.Error(err.Error())
  	}
  
  	w.WriteHeader(http.StatusOK)
  	w.Write([]byte(dr.Id))
  }
docs: // Add a new device report
  // Referenced objects (Device, Schedule event) must already exist
  // 404 If any of the referenced objects aren't found