Most common API. Rest style apis are restful.

  • Stateless. Server doesn’t remember anything about client
  • Standard HTTP methods
  • Often uses JSON
  • Single-request, may cause over-fetching or under-fetching Use a program to send a http protocol to a server.
  1. Send HTTP request
  2. Fetch data from database
  3. Return data in JSON format Open Auth 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

Retrieve resource headers without the resource itself. Similar to GET, but has no resource body