We are doing Salesforce (old instance) to Salesforce (new instance) migration. We have Standard and custom objects in our old instance which are needed to be migrated to the new Salesforce instance. We are doing this in the following steps:-
1: Using salesforce describe rest api create tables in MySQL with similar mapping of salesforce object. Tables are created with referential integrity using "referenceTo" field of describe call. Example: services/data/v49.0/sobjects/User/describe/.
2: Get data from salesforce using query rest api and put into MySQL tables. Example: /services/data/v39.0/query/?q=.
3: In this part, we have some confusion like which api we should use so that we can push records to destination org.
We are using Python for this task.