Cleanup Orphaned Dynamic Entity Records
DELETE /obp/v7.0.0/management/diagnostics/dynamic-entities/orphaned-records
OBPv6.0.0-cleanupOrphanedDynamicEntityRecords Roles: CanCleanupOrphanedDynamicEntityRecords Dynamic-EntityAPI
Delete orphaned dynamic entity data records.
Orphaned records are rows in the DynamicData table whose entityName/bankId combination has no matching Dynamic Entity definition. These can accumulate when entity definitions are deleted but their data records are not cleaned up.
This endpoint first identifies all orphaned records (using the same detection logic as GET /management/diagnostics/dynamic-entities), then deletes them.
Response Format:
deleted_orphaned_entities- List of orphaned entity groups that were deleted, each with:entity_name- Name of the orphaned entitybank_id- Bank ID (or empty string for system-level)record_count- Number of records that were deleted for this entity group
total_records_deleted- Total count of all deleted records
Authentication is Required
Required Role: CanCleanupOrphanedDynamicEntityRecords
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
Example success response
{
"deleted_orphaned_entities": [
{
"entity_name": "OldEntity",
"bank_id": "gh.29.uk",
"record_count": 42
}
],
"total_records_deleted": 42
}Possible errors (3)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-50000: Unknown Error.