fix API import_metadata to add metadata when source is new