Soft Delete
Mark stories as deleted while preserving data for potential recovery
Hard Delete
Permanently remove stories and all associated data from the database
Cache Management
Automatic removal of unsynced stories from local cache
Data Recovery
Soft deleted stories can be restored if needed
Deletion Types Overview
Understanding the differences between soft and hard deletion helps you choose the appropriate method for your content management strategy.Deletion Type | Data Preservation | Use Case |
---|---|---|
Soft Delete | ✅ Data preserved | ✅ Content moderation |
Hard Delete | ❌ Data permanently removed | ✅ GDPR compliance, permanent removal |
Hard deletion is irreversible. Once a story is hard deleted, all associated data including reactions, comments, and analytics are permanently removed and cannot be recovered.
Soft Delete Story
Soft deletion marks a story as deleted by setting theisDeleted
flag to true
, making it invisible to users while preserving all data for potential recovery or compliance purposes.
When to Use Soft Delete
- Content Moderation: Hide inappropriate content while maintaining evidence
- User Requests: Allow users to delete their own content
- Compliance Requirements: Maintain audit trails while hiding content
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
storyId | String | Yes | Unique identifier of the story to soft delete |
Hard Delete Story
Hard deletion permanently removes a story and all associated data including reactions, comments, analytics, and media files from the database. This action is irreversible and should be used carefully.When to Use Hard Delete
- GDPR Compliance: Right to be forgotten requests requiring complete data removal
- Legal Requirements: Court orders or regulatory mandates for data destruction
- Storage Optimization: Permanent cleanup of obsolete content to reduce storage costs
- Security Incidents: Complete removal of compromised or malicious content
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
storyId | String | Yes | Unique identifier of the story to permanently delete |
Consider implementing a confirmation workflow for hard deletions, especially for administrator actions, to prevent accidental permanent data loss.
Compliance Considerations
GDPR Compliance
Use hard delete for “right to be forgotten” requests
Data Retention
Implement appropriate retention policies for different content types
Audit Requirements
Maintain comprehensive deletion logs for compliance reporting
Legal Mandates
Ensure deletion practices meet local and international regulations