Skip to main content
The Purge API endpoint facilitates the bulk deletion of resources or relationships from a data source. This operation is ideal for cleanup tasks, ensuring that all data of a specific collection is completely removed from the target source.

Using the Purge Endpoint

A purge request specifies exactly what Data Source is the target of the operation, including the type and key of the contained collection to remove all data.
To delete all “providers” contained in a collection, the payload would look like:
For more details, see Create Purge Operation.

Purge Status

Once a purge operation is initiated, the system responds with a unique identifier (purgeId) and details about the operation’s progress:
You can use the purgeId to retrieve the status of an ongoing operation, similar to bulk operation monitoring. When the status is “SUCCESS”, the specified elements have been deleted from the registry, additionally, the system ensures eventual consistency at the partition level. This means that while the data has been purged from the data sources, there may be a delay before the changes propagate across all partitions referring to it.
For more details, refer to Using the Purge Status

Notes

  • Target the Correct Data Source: Ensure the collectionKey accurately identifies the intended collection within the data source to avoid unintentional deletions.
  • Use collectionType to Differentiate Targets:
    • resources: Targets resources like provider or office.
    • relationships: Targets relationships such as provider-office.
  • Best Practices for Safe Purging:
    • Review all inputs before initiating a purge.
    • Use status monitoring (purgeId) to confirm successful execution or handle errors.
Deletion PropagationThe purge operation uses a cascading effect. If a resource is deleted, all its attached relationships will also be deleted.This is not the case for relationships. Deleting relationships will not affect their referred resources.