liveBook · Manning

Resource identification

As explained in Building Web APIs with ASP.NET Core

Resource identification is the REST uniform-interface principle that each resource has an unambiguous identifier.

Resource identification gives every REST resource one unambiguous, unique URI. For example, https://mybglist.com/api/games/11 identifies one board game, independent of how the server implements it. section 1.1.4 section 3.1.6

A board-game URI

A client addresses board game 11 at https://mybglist.com/api/games/11. It can request that resource with GET or remove it with DELETE, using the same URI and choosing the appropriate HTTP method. section 1.1.4

Apply the principle by:

  • Assigning each individual resource a unique URI. section 1.1.4
  • Keeping the URI as the stable address while HTTP methods express operations such as reading or deleting. section 1.1.4
  • Returning representations such as JSON when clients retrieve resources. section 3.1.6

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Defines unique resource URIs and relates them to HTTP operations, but does not detail URI design or routing implementation.
Examples
Uses a board-game URI and GET or DELETE requests against that same URI.
What it assumes
Assumes basic HTTP awareness while defining resource identity, URI use, and representations within the REST interface.
What you can do after
Apply it via REST URI design to address individual resources consistently from clients.
How it connects
Connects resource identification with REST, uniform interface, HTTP methods, resource representations, and HATEOAS.

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.