I've seen URIs that support magic ids for the authenticated user like below:
GET /user/me - list my profile
GET /user/me/photos - list my photos
where the ones below use the actual user id
GET /user/742924
GET /user/742924/photos
The problem I see is that the same resource id points to a different resource depending on the authenticated user.
Is this going against any REST principles?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…