Moves get_plugin_instance_uids code into endpoint