code: public int createTaskWithReference(TaskCreate task, Reference reference,
  			boolean silent, boolean hook) {
  		return getResourceFactory()
  				.getApiResource(
  						"/task/" + reference.getType().name().toLowerCase()
  								+ "/" + reference.getId() + "/")
  				.queryParam("silent", silent ? "1" : "0")
  				.queryParam("hook", hook ? "1" : "0")
  				.entity(task, MediaType.APPLICATION_JSON_TYPE)
  				.post(TaskCreateResponse.class).getId();
  	}
docs: Creates a new task with a reference to the given object.
  
  @param task
  The data of the task to be created
  @param reference
  The reference to the object the task should be attached to
  @param silent
  Disable notifications
  @param hook
  Execute hooks for the change
  @return The id of the newly created task