fullstack_webdev

Code and notes from Full stack web developer path, LinkedIn Learning.

View on GitHub

10. Learning REST APIs

Intro


1. REST API: Representation State Transfer Application Programming Interface

01_01 The RESTful librarian

01_02 What is a REST API?

01_03 Sidebar: URI vs URL

01_04 The Six Constraints of REST

1. Client Server Architecture:

2. Statelessness

3. Cacheability

4. Layered System

5. Code on Demand

6. Uniform Interface

6.1 Resource Identification in requests

6.2 Resource Manipulation Through Representations

6.3 Self Descriptive Messages

6.4 Hypermedia as the engine of application state (HATEOAS)

01_05 How REST relates to HTTP

01_06 Who or what interacts with REST APIs?

01_07 Tools to see REST API in action

01_08 FAQs


02. REQUEST In REST

02_01 Anatomy of a REST request

02_02 Discovery

02_03 Resource and Representation

02_04 Methods (Verbs)

02_05 FAQs


3. Response

03_01 Response Header

03_02 HTTP Status Messages

Status Code Meaning
1xx Information
2xx Success
3xx Redirection
4xx Client Error
5xx Server Error

03_03 Request and Authorization/Authentication

03_04 FAQs


4. Request Response Pairs

04_01 Discovery using OPTIONS

04_02 GET & 04_03 POST

POST https://www.villagevoice.com/wp-json/wp/v2/posts
Content-Type: application/json
{
    "title": "A post created via the REST API",
    "content": "This is the content of the post created with the REST API.",
    "status": "publish",
    "author": 1
}

04_04 PUT/PATCH & 04_05 DELETE

04_06 FAQs