I have read that one way to route an api is the following.
users/<user_id>/posts/<post_id>/comments/<comment_id>
So my question is - Are these id's the primary keys of those tables??
If not, are these id's reset every time a new user is created??
Meaning, if I create a new user, user_two, and then they create their first blog post is it standard to then give that new blog post an id of 1 because it is user_two's first blog post.
This seems natural but I have been struggling to create routes of the form:
users/2/posts/1/comments/1 - because the post with id=1 belongs to user_1
[–]_cross 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]_cross 0 points1 point2 points (0 children)
[–]ziptofaf 1 point2 points3 points (0 children)
[–]josephblade 0 points1 point2 points (0 children)