Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This property contains one or more sub-properties. Each sub-property name defines an one or more embedded resource object objects within the current resource object. These embedded resource objects (which are technically sub-resources) represent a partial or whole resource object that should have its own API (i.e., URI endpoint). The reason for including embedded resource objects will vary and are always based on the developer's needs. Typically embedded resource objects are added to provide one API with enough additional resource information to prevent the need for additional API calls. This is very common with collection APIs. For example, in the above resource object we identified a URI with a relation of collection. An inspection of the URI itself reveals that the endpoint is simply /customers. The absence of a unique identifier to a customer (i.e., /customers/1) is expected to mean "all customers", also referred to as "the collection of customers".

...