code: @PostMapping(value = "/{entityTypeId}/{id}/{attributeName}", params = "_method=PUT")
    @ResponseStatus(OK)
    public synchronized void updateAttribute(
        @PathVariable("entityTypeId") String entityTypeId,
        @PathVariable("attributeName") String attributeName,
        @PathVariable("id") String untypedId,
        @RequestBody(required = false) Object paramValue) {
      EntityType entityType = dataService.getEntityType(entityTypeId);
  
      Object id = getTypedValue(untypedId, entityType.getIdAttribute());
  
      Entity entity = dataService.findOneById(entityTypeId, id);
      if (entity == null) {
        throw new UnknownEntityException(entityType, id);
      }
  
      Attribute attr = entityType.getAttribute(attributeName);
      if (attr == null) {
        throw new UnknownAttributeException(entityType, attributeName);
      }
  
      if (attr.isReadOnly()) {
        throw new MolgenisDataAccessException(
            "Attribute '" + attributeName + "' of entity '" + entityTypeId + "' is readonly");
      }
  
      Object value = this.restService.toEntityValue(attr, paramValue, id);
      entity.set(attributeName, value);
      dataService.update(entityTypeId, entity);
    }
docs: api