I have some logic that needs to be called by multiple applications ( mobile, web, …). Instead of duplicating this logic, I thought of putting it in a Rest API so that I could call it from any of the applications.
The “logic” that I wish to put on my Rest API basically reads, creates and deletes multiple rows from multiple databases all at once.
But, since this “logic” executes multiple actions at the same time ( it doesn’t only “GET” or “PUT” ), I feel like calling this method using the “GET” or “POST” Verbs would be weird.
So, my question is:
Is a Rest API really a good solution for this problem ?
If so, what would be the best way to handle this situation ? Should I just call it using whatever HTTP Verb I want ?