async def get_sync_dag(
    sync_id: UUID,
    db: AsyncSession = Depends(deps.get_db),
    current_user: User = Depends(deps.get_user),
):
    """Get the DAG definition for a sync."""
    dag = await sync_dag.get_by_sync_id(db, sync_id=sync_id, current_user=current_user)
    if not dag:
        raise HTTPException(status_code=404, detail="DAG not found")
    return dag
Get the DAG definition for a sync.
backend/airweave/api/v1/endpoints/dag.py