I have a java based rest server, and my clients will be using Ruby mostly.
What is considered the best practice for URL structure?
This is for JSON only.
Say this is a blog application:
e.g.:
Get all posts:
GET http://www.example.com/api/v1/posts.json
Delete post with id 1:
DELETE http://www.example.com/api/v1/posts/1.json
What about embedded collections like:
Get all comments for post 1:
GET http://www.example.com/api/v1/posts/1/comments.json
View post 1's comment with id 1:
GET http://www.example.com/api/v1/posts/1/comments/1.json
Is there a document that goes over this somewhere? Something fairly "official"?