2.0 Understanding and Using APIs Flashcards
2.1: what are 5 common HTTP request methods
Get
Post
Put (U for update)
Delete
Patch (A for append)
2.4: Response codes: 100’s
Informational
2.4: Response codes: 300’s
Redirect
2.4: Response codes: 200’s
Success
2.4: Response codes: 500’s
Server Errors
2.4: Response codes: 400’s
Error
2.4 Response code 403
You are not authorized to view this page (HTTP Error 403 - Forbidden)
2.4: Response code 404
The page cannot be found (HTTP Error 404 - File not found)
2.4: Response code 429
The HTTP return code of 429 indicates that the user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
2.1: what is the difference between PUT, POST, and PATCH
POST - Submits data to a specific destination
PUT - Replaces completly data at a specific destination
PATCH -makes a partial update on a resource
2.2 Describe common usage patterns related to webhooks
Webhooks set up on a host to push data to an API when certain events trigger it.
Example: At certain points in an Amazon order the webhooks will send data to the customer portal API to update order status
2.3 Identify the 6 constraints when consuming APIs (REST)
- Client-Server
- Stateless
- Cache
- Uniform Interface
- Layered System
- Code-On-Demand (optional)
2.3: What does the REST API restraint “Stateless” mean?
The server will not store anything about the last HTTP request from a client. Each request will be treated as new.
2.3: What does the REST API restraint “Uniform Interface” mean?
ses the same protocols all the time. Always HTTPS or only HTTP for example.
2.6 Identify the parts of an HTTP response: response code
The code is located in the first lines, optionally it will have text beside it.