A REST API has very little to do in the context of migration of say tables from a database.
REST is really just a simple process in which you expose a URL in the web site that has some function or process that you wish to run on the web server from the client side browser. As such, there not really much of a relevant context or narrative of using REST and data migration in the same context.
In most cases, you migrate your data by several means.
One approach is to transfer the database file(s) to the web server, and then say attach that database file to the sql server you using.
Some cases, you can export the database data as say csv files, and then on web server side, you often have some database import utilities that allow you to import the data.
In some cases, you can script out the database + data with scripting tools. You then FTP or upload that sql script to the web server, and then run that script on the web server.
So the concept, the approach, and how you migrate database information usually has rather little to do with REST.
Now, once you have the data moved up to the web server and connected up to the database system?
Then sure, at that point, you can create some REST methods to pull data from the database, and you can create some REST methods to insert or update data in the database.
So, the concept of updating data in the database? Sure, REST methods can be created by you for this purpose.
But, a data migration? No, you not use REST to achieve this goal. In fact, the transfer of the database information should and will in most cases occur BEFORE you start coding up some REST methods that you need and want for your given application.
So, REST is just a means for you to expose server side (web site) code and methods to the client side code (JavaScript running in the browser client side).
Thus, migration of data? Tends to be quite a separate topic. Now it is possible that you wanting to use say some pre-existing web site and service. And they may very well provide some REST calls that allows you to up-load or transfer data. But in most cases, a database transfer of information is not done nor achieved by using REST calls.
You are certainly free to code up some REST methods on that web site, and use those REST methods to transfer data. However, in most cases, you not need nor use nor require to code up some REST methods on that site to help you transfer the data. You could perhaps write and create some REST methods to help you transfer of such data – but in most cases, you have quite a few options to transfer such data – and do so without you having to create some REST methods on that site for this purpose.
I would thus only suggest to use REST to transfer your database and information to a web site WHEN the web site hosting already has a bunch of REST methods pre-built for you. In that case, then sure – write and use some client side software to transfer data.
But in the context of a database migration project? You building and writing some REST methods on the web site side of things is not a typical approach. I suppose if that web site did not provide any other means to migrate and up-load database information, then I suppose as a last resort, you could then as noted code up some REST methods to help you in this process – but it certainly not the normal approach here.
Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada