From the course: Designing RESTful APIs

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Mapping activities to verbs and actions

Mapping activities to verbs and actions - REST Tutorial

From the course: Designing RESTful APIs

Mapping activities to verbs and actions

- [Instructor] So now let's review where we are. We've defined a single user story, broke it into concrete steps, and identified the nouns that we're interacting with. We're still in step four, so now we need to map those nouns to our HTTP verbs. Since we determine that this is mostly a CRUD scenario or create, read, update, delete, our steps are pretty simple, and they use the basic verbs. Post, Get, Put and Delete. There are many other verbs available within HTTP but these are the most common ones you'll see. First, GET. GET is used to retrieve data. You should never use it to modify information. Not surprisingly, DELETE is used to delete data. You should not use it for anything else. Next, we have PUT. PUT will update an existing record. You should not use it to create or delete or anything else. And finally, there's POST. POST is the catch-all for HTTP. You can use it to create new records and basically…

Contents