Member-only story
REST API Endpoints Naming Guidelines
REST APIs are among the most widely used web interfaces today, enabling communication between various clients, including browser apps, and services. As such, it’s crucial to design REST APIs thoughtfully to avoid potential issues in the future.
By establishing a consistent set of rules, standards, and conventions, we can ensure a smooth developer experience and streamline the process of building complex business workflows by leveraging multiple, complementary functionalities as building blocks.
What are REST API Endpoints?
REST APIs rely on Uniform Resource Identifiers (URIs) to identify resources. API designers need to create URIs that communicate the resource model to potential clients. Well-named resources make an API intuitive and easy to navigate, while poorly designed names can make the API difficult to use and understand.
As a general guideline, the resource path consists of the namespace, resource name and optionally one or more sub-resource
:resource-name/[:resource-id]/[:sub-resouce]namespace (optional) — Namespace identifiers are used to define the context and scope of resources, typically corresponding to the domain name or a specific category within the system. When a namespace is introduced in an API, it should be used…
