I know the difference, but when do I use PathParam or QueryParam? Is the following explanation correct?
If there is a scenario to retrieve the record based on id, for example you need to get the details of the employee whose id is 15, then you can have resource with @PathParam.
GET /employee/{id}
If there is a scenario where you need to get the details of all employees but only 10 at a time, you may use query param
GET /employee?start=1&size=10