The endpoint routes the HTTP request based on the method and path.
Endpoint methods are color-coded to easily differentiate them in the flow.
GET The GET method enables requests to retrieve resource representation/information only.
HEAD The HEAD method is the same as GET without the response body.
POST The POST method enables requests to submit an entity to the specified resource. Assign POST endpoint with caution and it can cause a change in state or side effects on the server.
PUT The PUT method enables the requests to replace all current representations of the target resource with the request payload.
DELETE The DELETE method enables requests to delete the specified resource.
CONNECT The CONNECT method enables the requests to establish a tunnel to the server.
OPTIONS The OPTIONS method provides the communication options of the target resource.
TRACE The TRACE method enables a request to perform a message loop-back test along the path to the target resource.
PATCH The PATCH method enables partial modifications to a resource.
The resource path is the Uniform Resource Identifier (URI) address for a given resource. You can name the URI anyway you want but following some best practices can make life easier for the potential client developers of your APIs.
Below are a few naming best practices to follow
For example, “user” is a singleton.
For example, “users” is a collection
For example, “email” of a particular “user” is a sub-collection