While many resources in an API belong to the same domain, they are often different enough that there is no obvious relation between them. Additionally, clients might want to access a resource without first having to access other related resources (e.g. listing a user’s order history doesn’t require reading the user’s data beforehand).

Often, there is some information related to a resource that is slow to produce; for this reason, you want to make it optional to get, or defer fetching it to achieve faster Largest Contentful Paint (LSP).

When building APIs that support complex queries, clients often need to submit structured search criteria that must be validated before processing. Sending invalid query parameters can result in errors or unexpected results, and complex validation logic may require server-side processing.

When interacting with a hypermedia API, clients follow links to fetch data and perform actions; however, clients need an entry point into the API.

A resource has a property that can be changed by the client but must have a value within a specific set.

When exposing resources through an API, there are often related pieces of data that are expensive to compute or fetch, such as aggregated statistics, related resources, or computed fields. Including all this data by default can make responses slow and unnecessarily large for clients that don’t need it.

In authenticated APIs, clients often need to determine information about the current authenticated user or session context, such as user identity, permissions, roles, or current authentication state.