First, I do know path parameters need to be used when you are pointing at a resource and query parameters are meant to be used when you define something that can add a "property" (or change in time).
However, let's assume I need to get data belong to a user.
In this case, I am a fan of writing the REST API URL like this.
https://mylink/user/getbyid
And not
https://mylink/user/get
In the way I write the REST API, I will call the URL like /user/getbyid?id=1
. In the way, I do not write the API, you will call it /user/get/1
.
Since I write my API calls like /user/getbyid
, /user/getbyname
, /user/getbyuid
I rarely use path parameters. 99% of the time I am using query parameters.
Considering the way I write my API calls, am I going against the best practices? Or is what I do right or ignorable?