Theo như wikipedia, “Representational State Transfer (REST) is an architectural style that defines a set of constraints and properties based on HTTP”.
Nói một cách dễ hiểu, REST đưa ra 1 chuẩn chung quy định format của URL và quy định cách sử dụng các HTTP method (GET, POST, PUT, PATCH, DELETE) tương ứng để quản lý tài nguyên web (resource).

Các tài nguyên web (web resources) có thế là bất cứ thứ gì hoặc là 1 model được định nghĩa như Car, User, Color… Các thao tác CRUD (create, read, update, delete) các resource được REST quy định như sau.
Đối với Collection:

+ Lấy thông tin tất cả các resources (read):

  • URL: https://api.example.com/resources/
  • HTTP method: GET

+ Tạo mới 1 resource vào trong collection:

  • URL: https://api.example.com/resources/
  • HTTP method: POST

+ Xoá 1 collection:

  • URL: https://api.example.com/resources/
  • HTTP method: DELETE

+ Thay thế 1 collection:

  • URL: https://api.example.com/resources/
  • HTTP method: PUT

Element:

+ Lấy thông tin resource cụ thể với id (read):

  • URL: https://api.example.com/resources/12
  • HTTP method: GET

+ Xoá 1 resource:

  • URL: https://api.example.com/resources/12
  • HTTP method: DELETE

+ Thay thế 1 resource hoặc tạo mới nếu không tồn tại:

  • URL: https://api.example.com/resources/12
  • HTTP method: PUT

+ Cập nhật 1 resource:

  • URL: https://api.example.com/resources/12
  • HTTP method: PATCH

REST API với RESTful API có khác nhau không?

Chúng có thể xem là một. Vì RESTful API là webservice APIs sử dụng các chuẩn của kiến trúc REST.