Most common API. Rest style apis are restful Use a program to send a http protocol to a server. This is stateless, so server doesnât remember anything about the client.
- Send HTTP request
- Fetch data from database
- Return data in JSON format OAuth is commonly required to access an API functionality
Constraints
- Client-server architecture
- Statelessness
- Layered system
- Cacheability
- Uniform design
- Code on demand
HTTP Requests
GET
Retrieving data from the server.
- Used for non-sensitive data
POST
Send data to the server
- Used for authentication
- Used to create things
PUT
Updating information
- SQL
DELETE
Delete a resource on the server
HEAD
Retrieve resource headers without the resource itself. Similar to GET, but has no resource body