At the very minimum, we should add canonical URIs to all core-provided entity types.

This is basically a request to add the same feature as


Currently, there is no central definition of the path to an entity. Sure there's its route/menu item, but we can't reverse associate from that.

Sure entities now have a uri() method, but you need an entity object for that. Also, the default implementation still uses a uri callback function, for no reason I can fathom.


Proposed resolution

Bite the bullet. What we really need here is to define a canonical path TEMPLATE for an entity type. When I say template, I mean the uri-template specification, RFC 6570:


In particular, we should define multiple such patterns. One for each operation, as identified by a link. ... What does "identified by a link" mean? I mean using one of the IANA standardized link relationships (which collects relationships defined by IETF RFCs as well as the W3C):

It's possible to define your own, but there's plenty there we can already use.

...nodes might look something like:

links = {
  "canonical" = "/node/{node}",
  "edit-form" = "/node/{node}/edit",
  "create-form" = "/node/add/{entity_subtype}",
  "version-history" = "/node/{node}/revisions"

D8 change record:

GitHub Issue #: