Versions Compared

Key

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

...

  • Simple to call.
  • It creates the Response Body,  and Content-Type header, and Status Code automaticallyHeader automatically.

Cons:

  • Deprecated (but there are no plans to remove it).
  • HATEOAS support is limited.
  • Cannot include the Key ID within the resource object.

...

In many ways, GetObject and GetDatabaseItem are the same. As demonstrated in the code below, their arguments are very similar, including sharing many of the same arguments. GetObects differs from GetDatabaseItem in the following ways:

  • GetDatabaseItems returns the resource object in serialized JSON (i.e., stringified JSON) whereas GetObject returns a handle to the JSON object.
  • GetDatabaseItems automatically updates the Response Body with the resource object and the Content-Type Header whereas GetObject leaves this to the calling process to handle.
  • GetDatabaseItems will create a self and a collection HATEOAS links if the optional SelfURL argument is used whereas GetObject only creates a self HATEOAS link.

This produces the following resource object:

...