
When designing the path structure of a RESTful API, we can refer to the domain model.
Defining a few basic HTTP Methods can simplify the API design. For example, PATCH can often be a problem for teams.
Designing for idempotence in advance can improve the robustness of an API. GET method is idempotent, but POST needs to be designed properly to be idempotent.
Define a limited number of HTTP status codes to use to simplify application development.
Designing the version number for the API in advance can simplify upgrade work.
Using semantic paths makes APIs easier to understand, so that users can find the correct APIs in the documentation.
Use batch/bulk as a keyword and place it at the end of the path.
Designing a set of query rules makes the API more flexible. For example, pagination, sorting, filtering etc.
When designing the path structure of a RESTful API, we can refer to the domain model.
Defining a few basic HTTP Methods can simplify the API design. For example, PATCH can often be a problem for teams.
Designing for idempotence in advance can improve the robustness of an API. GET method is idempotent, but POST needs to be designed properly to be idempotent.
Define a limited number of HTTP status codes to use to simplify application development.
Designing the version number for the API in advance can simplify upgrade work.
Using semantic paths makes APIs easier to understand, so that users can find the correct APIs in the documentation.
Use batch/bulk as a keyword and place it at the end of the path.
Designing a set of query rules makes the API more flexible. For example, pagination, sorting, filtering etc.