At Alertpix we allow streamers to receive donations from their audience via Pix Instant Payment and show an alert on the live stream.
Our API excl...
For further actions, you may consider blocking this person and/or reporting abuse
The typical approach for your example is to use query parameters.
This allows us to query by multiple things if necessary.
If you use the path for that, you run into the same which-way-around issue we were trying to avoid.
Classic Rest is pretty common wel built and well adopted.
This is just adding to confusion by doing things in a unique way. Rearly a good idea doing any API not just web.
Respect for trying to move things in some direction, but this seems not to be it.
If this is just a contraversial post for attention, good job, got me 👍
you may need to know the difference between rest apis and vig apis.
where rest apis are for resources and vig apis are for logics.
And with the backend js web framework aex you can combine them together into one class.
github.com/calidion/aex/blob/maste...
I feel compelled to pile up on the negative to accept this acceptable. I'll start by saying that user interfaces are for humans, while API's are for machines: The uer interface is run by a machine, and this machine uses the API to communicate with the back-end. See? Machine to machine. The human uses the UI.
Timothy Foster is right: When you are querying, usually you query with the query string part of the URL. The added path segments are done for a different purpose. Examples:
Get all books from an author:
/authors/:authorId/booksThese are by no means mandatory, as this can be expressed as
/books?authorId=:authorId. I personally provide the former as I believe is quite expressive and unambiguous.Sorry, one of the deadliest misconceptions of Restful Services is to think in terms of HTTP. But that's not the right thing. Understanding the basics of resources, sub-resources, etc. is the key thing for the success. Hence, I would highly recommend everyone to invest on the basics, understand the intent and motivation behind the creation of the most patterns and best practices.