sub-resource
A resource addressed beneath another, such as /tasks/1/owner, usually to express a relationship.
In more detail
One level of nesting is often enough. Deep paths couple the lifecycles of every parent and become hard to change, so a child with its own independent life deserves its own top-level address.
Related terms
- path segment — One slash-separated piece of the path in a web address, such as tasks or 1 in /tasks/1.
- embedding — Including a small copy of a related resource inside a representation, instead of only linking to it.
- link relation — The name that says what a link means, such as next, author or self, written as rel in a Link header.
Taught in
- Naming Resources And Collections — Modern API Architecture: REST, GraphQL & gRPC
- Sub-resources And Relationships — Modern API Architecture: REST, GraphQL & gRPC