This chapter covers
- Specific definitions for import and export
- Interacting directly with remote storage systems
- Converting serialized bytes into API resources
- Handling consistency for exporting volatile data sets
- How unique identifiers should be processed when importing and exporting
- What to do about related resources being imported or exported
- Handling failures during import or export operations
- How import and export differ from backup and restore
- Filtering data on input and output data
In this pattern, we’ll explore how to safely and flexibly move resources in and out of an API via custom import and export methods. More importantly, this pattern relies on the API communicating directly with the external storage system rather than through an intermediary client. We’ll make all of this work by defining several loosely coupled configuration structures to cover the various aspects of these resources on their journey between the API and the underlying storage system, maximizing both flexibility and reusability.