An import request identifier is a globally unique value assigned to each resource created during an import. The service caches it when first seen and discards later attempts with the same identifier, preventing duplicate resources when failed imports are retried. section 23.3.7
Use the identifier when transactional guarantees are unavailable or impractical:
- Assign one importRequestId to every imported record, rather than relying on the resource ID, which may be ignored during import. section 23.3.7
- Cache identifiers after first creation and reject or discard later records carrying an identifier already seen. section 23.3.7
- Consider injecting identifiers into exported data so the same records can be re-imported safely. section 23.3.7
Deduplicating imported resources
An import can carry records such as { importRequestId: "abc", sender: "users/1", content: "hi" }. Retrying the record with identifier "abc" lets the API recognize it as already processed instead of creating another resource. section 23.3.7
Listing 23.7 Some sample JSON resources with import request IDs for deduplication
{ importRequestId: "abc", sender: "users/1", content: "hi" } #1
{ importRequestId: "def", sender: "users/2", content: "hi back" }
Review sample JSON resource entries that pair importRequestId values with resource fields. section 23.3.7
