Hacker News new | ask | show | jobs
by chrisrogers 4380 days ago
You would use RPC.
1 comments

This. While this API is not RESTful at all, that's just a nomenclature problem; it's totally fine as an API [1]. RPC is perfectly appropriate for a wide range of problems and there's no need to shoehorn every application into REST just because people say It's the Thing to Do. I could imagine a RESTful API for this, as people have above, and it might work well. But it isn't some sort of obvious best practice.

[1] Except that it really ought to use POST.