Web and Mobile Development: RESTful Services

Bill Mongan

RESTful Services

  • URL endpoints
    • http://www.example.com/api/v1/item
  • Why not this?
    • http://www.example.com/api/v1/item/delete
  • Why is v1 a good idea here?

RESTful Services

  • Roy Fielding’s PhD Thesis
  • Utilizing HTTP verbs to manipulate RESTful nouns

CRUD

  • Create (returns an ID): POST
  • Update (with an ID - idempotent): PUT
  • List Many or Retrieve a Single Item: GET
  • Delete (with an ID): DELETE

HTTP Body Parameters

  • Headers
    • Content-Type: application/json
  • Body Parameters
    • Encrypted with SSL
    • Authentication tokens, parameters