Designing a REST API path to import products from a csv file

In my application, I download a csv file with all products using HTML file upload . The internal workflow is notified via a trigger from the file directory as soon as the file download is complete. At this point, the internal workflow calls the REST API (with the filename only) to begin processing the csv file for insertion into the database.

I don't know if my call to process the csv file is quiet. I have come up with the following paths, treating products as a resource. Is this design calm? If that's not comforting, shouldn't you use behavior like REST, but use WCF or such RPC calls.

http://localhost/products/import/productsfile.csv *(GET method)*
http://localhost/products/productsfile.csv/import *(GET method)*
http://localhost/products/ *(POST method with the name of the file)*

      

+3


source to share





All Articles