Skip to content

abhishekmaity/rest-web-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub branch checks state GitHub

REST web service

This a learner repo for REST web service development

Social Media Application

REST APIs for User

  • Retrieve all Users
    • GET/users
  • Create a User
    • POST/users
  • Retrieve one User
    • GET/users/{id}
  • Delete a User
    • DELETE/users/{id}

REST APIs for User Posts

  • Retrieve all posts for a Users
    • GET/users/posts
  • Create a post for a User
    • POST/users/{id}/posts/
  • Retrieve details of a post
    • GET/users/{id}/posts/{post_id}

Versioning of REST API

URI versioning like Twitter

Request Parameter versioning like Amazon

Custom Header versioning like Microsoft

  • SAME-URL headers=[X-API-Version=1]
  • SAME-URL headers=[X-API-Version=2]

Media Type versioning (a.k.a "content negotiation" or "accept header") like GitHub

  • SAME-URL produces=application/vnd.company.app.v1+json
  • SAME-URL produces=application/vnd.company.app.v2+json