Python Classroom notes 10/Aug/2026

REST APIs

VERBS/Methods

  • GET
  • POST
  • PUT
  • DELETE
  • PATCH

Status Codes

  • This a 3 digit number between 100-599
  • Status code categories
    • Information 1xx
    • Success 2xx
    • Redirection 3xx
    • Client Side errors 4xx
    • Server side errors 5xx

HTTP Headers

  • These are key value pairs

REST Design philosopy

  • Verbs and Nouns
  • Lets think of IRCTC
    • Nouns:
      • User
      • Employee
      • Train
      • Station
      • Berth
      • Food
    • Verb:
      • User:
        • Create => POST
        • Update => PUT/PATCH
        • Delete => DELETE
        • Get => GET
  • URI: Uniform Resource Identifier

    • Get all users (GET)
      • URI => /v1/users
    • Get the specific user with id 1 (GET)
      • URI => /v1/users/1
    • Create a user (POST)
      • URI => /v1/users
      • userinfo => some json schema
    • Update the user with id 1: (PUT)
      • URI => /v1/users/1
      • full or partial user info.
  • Once we create an API to be used by customers we need to document apis, that is where openapi format and swagger are widely popular Refer Here

By continuous learner

enthusiastic technology learner

Leave a comment