Response representation composition

When REST APIs evolve with new features, the client may require new resources from its supporting REST API. However, for many practical reasons, the client may need new resources from the REST API. So a REST API can provide a measure to control the composition of its response representations. It's crucial that REST APIs maintain a consistent resource model design, so clients can benefit from the composite responses. The following two rules enable the client to tune the responses:

  • It should support partial response by using the query component of a URI
  • It should embed linked resources by using the query component of a URI

For examples, you may refer back the URI query section of this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.39.23