Atomic Routes
This section documents the atomic operations and data validation API endpoints.
backend.routes.atomic_routes
Atomic Operations and Data Validation Routes
This module provides API endpoints for: 1. Data consistency validation 2. Backup management 3. Atomic operation status 4. Data integrity checks
These endpoints ensure the NDF Studio backend maintains data integrity and provides tools for monitoring and maintaining the system.
Classes
Functions
validate_graph_consistency_endpoint(user_id: str, graph_id: str)
Validate the consistency of a graph's data.
This endpoint performs comprehensive validation of:
- Node registry consistency
- Relation registry consistency
- Attribute registry consistency
- File existence checks
- Reference integrity
Returns validation results with issues and warnings.
Source code in backend/routes/atomic_routes.py
cleanup_old_backups_endpoint(user_id: str, max_age_hours: int = 24)
Clean up old backup directories for a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
str
|
User ID |
required |
max_age_hours
|
int
|
Maximum age of backups to keep (default: 24 hours) |
24
|
Returns:
| Type | Description |
|---|---|
|
Number of backups cleaned up |
Source code in backend/routes/atomic_routes.py
get_backup_status(user_id: str)
Get the status of backups for a user.
Returns:
| Type | Description |
|---|---|
|
Information about existing backups |
Source code in backend/routes/atomic_routes.py
get_atomic_operation_status(user_id: str, graph_id: str)
Get the status of atomic operations for a graph.
Returns:
| Type | Description |
|---|---|
|
Information about the graph's atomic operation status |
Source code in backend/routes/atomic_routes.py
force_regenerate_composed_files(user_id: str, graph_id: str)
Force regeneration of all composed files for a graph.
This endpoint triggers a complete regeneration of:
- composed.json
- composed.yaml
- polymorphic_composed.json
Returns:
| Type | Description |
|---|---|
|
Status of the regeneration operation |