Change field source programatically?

I work with a following use case:

After copying a dashboard, I manually change schema references in the queries and then re-link field filter tables to the new schema's tables as well. I am now attempting to do this programmatically, via API.

I would appreciate explained flow of how to update/switch out a field filter linked table via API to try and save some time instead of looking in the networks tab (confusing so far).

Thanks!

Upon further research, fields are abstractions of database table columns.
Hence, for native queries I updated template-tags values to indicate matching fields of tables from new schema, for GUI queries I updated all ["field", id, ...] structures in the card payload

Hi @avocado_toast can you provide some examples? I'm attempting something similar but the request fails if it detects a difference between the database associated with the field filter and the database of the copied card.