Deleting an item in a RESTful API is similar to a fetch. You mostly need to somehow specify the item to delete. This is usually done by way of a unique ID or key. Learn how to map the DELETE request from the client to the endpoint through the integration step. From there, you can determine if a 200 response is successful and return a hard-coded JSON response.
- [Instructor] So the next RESTful API method…we're gonna tackle is the DELETE.…And normally we might move on to the HOST,…however the DELETE is much more like the GET…and we wanna build on that model that we've been using.…So we'll do a lot of the same types of steps,…but we're gonna add a couple as well.…So we're gonna add the DELETE method…on the resource we wanna delete,…in this case it'll be the same as we did with the GET…where we have the URL with the item ID.…We're gonna build a model for the response that'll…just contain success or fail,…and then we'll use that in the method response…and integrate that to map what we get back…from the server to our model.…
So we're gonna create the DELETE method on the music item,…then we're gonna create the model with success…as a Boolean property, then we'll use that model…in the method and integration response.…So back at our API, we're gonna select the item ID resource…and from the actions we'll create a new method for DELETE.…When we check the box, we'll get our options.…
Author
Released
8/24/2018- Creating APIs with the AWS API Gateway
- Using GET, DELETE, and POST methods and models
- Generating SDKs
- Creating DynamoDB tables
- Creating Lambda functions
- Creating APIs for Lambda
- Generating the client API with Swagger
Skill Level Intermediate
Duration
Views
Related Courses
-
Deploying Docker to AWS
with Arthur Ulfeldt1h 29m Intermediate -
Planning an AWS Solution
with Ryan Spence1h 13m Intermediate -
iOS Development with Firebase
with Bear Cahill1h 46m Intermediate -
Building iOS Apps with AWS Mobile
with Bear Cahill1h 48m Intermediate
-
Introduction
-
Easy RESTful API creation1m 18s
-
-
1. Getting Started with API Gateway
-
AWS components intro3m 15s
-
Create an API in API Gateway2m 58s
-
Create a mock GET API method4m 22s
-
-
2. API Gateway to HTTP Service
-
DELETE method and model5m 17s
-
POST method and model7m 43s
-
Generate an SDK with Swagger2m 31s
-
iOS client SDK generation5m 12s
-
3. DynamoDB and Lambda
-
Create a DynamoDB table2m 16s
-
Create a Lambda function3m 24s
-
Test POST to table2m 54s
-
Test GET from table2m 12s
-
-
4. API Gateway to Lambda
-
Create an API for Lambda2m 23s
-
Create a GET request7m 15s
-
Create a DELETE request2m 14s
-
Create a POST request4m 5s
-
Create a PUT request4m 20s
-
-
5. Client SDK from Swagger
-
Review the creation process2m 26s
-
-
Conclusion
-
Next steps40s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: DELETE method and model