http - Describing RESTful URLs -


here's example url:

/users/123/comments 

based on url, term best describe users? users resource or part of resource. name of part?

the same question goes other parts. terms best describe 123 , comments?

is there term refer second part of restful urls? describe 123 in /users/123 , purchases in /me/purchases.

rest resource-oriented. urls represent resources.

in example, /users/123/comments:

  • users resource.
  • 123 unique identifier of user.
  • in case, comments sub-resource of users, resources on own (ex. calling /comments/{id})

about second question, format /me/purchases not same /users/123. , /me/purchases short url /users/{myid}/purchases purchases sub-resource of users (and resource on own also, available /purchases/{id}).


for more information, here video, not directly related question, made , interesting rest web services.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

php - Dynamic url re-writing using htaccess -

java - Multi-Label Document Classification -