The endpoint routes the HTTP request based on the method and path.

Settings

  1. Select Method

  2. Assign Path

Methods

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.

Resource Path

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

Singleton
For example, “user” is a singleton.

/users

Collection
For example, “users” is a collection

/users/{user-Id}

Sub-collection
For example, “email” of a particular “user” is a sub-collection

/users/{user-ID}/email

Reference
https://restfulapi.net/resource-naming/
https://nordicapis.com/10-best-practices-for-naming-api-endpoints/

0 0 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments