Also, I have a side question regarding how I should organize my endpoints. Essentially, I am developing a ticket system similar to Jira, where you can assign a ticket to yourself or someone else. I want to create four different screens: tasks assigned to me, tasks assigned by me, my tasks, and archived tasks. On each screen, I want to display three different task lists: overdue tasks, tasks due today, tasks due tomorrow, and tasks completed today. Now, the question is whether I should have only one endpoint with filtering capabilities, and have the frontend handle the screens using filters, or if I should have separate endpoints for each screen. The latter approach may offer better security by allowing me to apply guards or where clauses to filter tasks based on access. However, from a REST perspective, it is still challenging for me to decide how to best organize my endpoints for this particular business case.
#REST endpoints design
7 messages · Page 1 of 1 (latest)
As you said. Will you use different guards, permissions etc? If not then it looks like filters
I think that a good practice would be to have some guards or just apply where filter which would narrow down the results
@fierce drift Also do you mind DMing you for different things
Let's still use the server, the knowledge will be spread
So if you were to design this ticketing system, how you would organize your endpoints and query params
@hidden cloud some rest endpoint design best practices:
https://restfulapi.net/rest-api-design-tutorial-with-example/
IMO really great ressource