2. Resources and URIs

Learn how to identify and define resources in your API. Understand the role of Uniform Resource Identifiers (URIs) in uniquely identifying resources. Discover best practices for structuring URIs to reflect the hierarchy and relationships between resources.

Resources: A resource is any piece of information that can be addressed, such as users, articles, or products. Resources are at the core of RESTful APIs and are identified by URIs.

URIs (Uniform Resource Identifiers): URIs are unique addresses that identify resources. They consist of a base URI and a path segment that corresponds to the resource. Well-designed URIs should be descriptive, hierarchical, and follow a consistent naming convention.