I am creating an api and the client can make a GET request to get all the user documents. I'm unsure if I should have the user id in the URI or not. I will not be needing the id in the url, because I have issued a jwt token that already contains the user id. So which one is "better" according to the restful design principles?
GET /documents
or
GET /users/{id}/documents
Should shared documents also have an URI like GET /documents/shared or would one of the above still be ok to use?