API Endpoints Question to take advantage of Query Keys
I currently only have a single GET request for the Users object below and curious if I should ask the API team to make new endpoints.
Current API Setup /users -> Have one GET for users which returns the object above. /users/{filters}. To get one user, which returns an array of users (I just do users[0] on response). filters = "?id=${id}" Setup I want to propose /users/{filters} -> Stays the same and returns the full object given no filters /users/{ID} -> Returns a Single User /users/{ID}/roles -> Returns A single User's Roles /users/{ID}/skills-> Returns A single User's Skills /users/{ID}/job-position -> Returns a User's Job Position (For this I wasn't sure if it should be /job-position/user/{ID} instead since job-positions is a list view in other route)
Current API Setup /users -> Have one GET for users which returns the object above. /users/{filters}. To get one user, which returns an array of users (I just do users[0] on response). filters = "?id=${id}" Setup I want to propose /users/{filters} -> Stays the same and returns the full object given no filters /users/{ID} -> Returns a Single User /users/{ID}/roles -> Returns A single User's Roles /users/{ID}/skills-> Returns A single User's Skills /users/{ID}/job-position -> Returns a User's Job Position (For this I wasn't sure if it should be /job-position/user/{ID} instead since job-positions is a list view in other route)
0 Replies