Hands-On RESTful API Design Patterns and Best Practices
by Harihara Subramanian J, Anupama Murali, Pethuru Raj
URI templates
As we saw in Chapter 1, Introduction to the Basics of RESTful Architecture, a Uniform Resource Identifier (URI) is often used to identify a specific resource within a common space of similar resources. For instance, if we pick up the Star Wars API example from Chapter 1, Introduction to the Basics of RESTful Architecture, the films resource is represented by the URIs https://swapi.co/api/films/2, https://swapi.co/api/films/3, and so on. It is always the case that the client may need to include some additional information in their request, and how the server lets the client include that information about resources in the URIs. Server-side developers require the ability to describe the layout of the URIs that their services will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access