Web API Conventions

Web API Convention: Web API conventions are basically set of rules that guides to build maintainable, scalable APIs and and provides consistency as well. Use of Http methods properly like GET, PUT, POST, PATCH, DELETE. Then it comes to naming convention which tells us to use nouns not verbs such as /users , /invoices etc. One more thing in namming convention is that not to use action in the path for example /getUsers instead of it use method GET and keep name a noun like /users. The third thing using appropriate status codes for corresponding status for example 200 for success and 400 for bad request and so on. And at last use versioning e.g. /v1/users and consistent request and response formats i.e. JSON format.

May 7, 2025 - 15:34
 0
Web API Conventions

Web API Convention:

Web API conventions are basically set of rules that guides to build maintainable, scalable APIs and and provides consistency as well.

  1. Use of Http methods properly like GET, PUT, POST, PATCH, DELETE.
  2. Then it comes to naming convention which tells us to use nouns not verbs such as /users , /invoices etc.
  3. One more thing in namming convention is that not to use action in the path for example /getUsers instead of it use method GET and keep name a noun like /users.
  4. The third thing using appropriate status codes for corresponding status for example 200 for success and 400 for bad request and so on.
  5. And at last use versioning e.g. /v1/users and consistent request and response formats i.e. JSON format.