17 Copy and move

This chapter covers

  • How to use the copy and move custom methods for rearranging resources in an API
  • Choosing the right identifier (or identifier policy) for copy and move operations
  • How to handle child and other resources when copying or moving parent resources
  • Dealing with external data references for copied or moved resources
  • What level of atomicity should be expected from these new custom methods

While very few resources are considered immutable, there are often certain attributes of a resource that we can safely assume won’t change out from under us. In particular, a resource’s unique identifier is one of these attributes. But what if we want to rename a resource? How can we do so safely? Further, what if we want to move ...

Get API Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.