MCPcopy Create free account
hub / github.com/ScrapeGraphAI/scrapecraft / run_pipeline

Function run_pipeline

backend/app/api/pipelines.py:81–101  ·  view source on GitHub ↗

Execute a scraping pipeline.

(pipeline_id: str)

Source from the content-addressed store, hash-verified

79
80@router.post("/{pipeline_id}/run")
81async def run_pipeline(pipeline_id: str):
82 """Execute a scraping pipeline."""
83 if pipeline_id not in pipelines_store:
84 raise HTTPException(status_code=404, detail="Pipeline not found")
85
86 pipeline = pipelines_store[pipeline_id]
87
88 if not pipeline.urls:
89 raise HTTPException(status_code=400, detail="No URLs defined in pipeline")
90
91 if not pipeline.schema:
92 raise HTTPException(status_code=400, detail="No schema defined in pipeline")
93
94 # TODO: Execute scraping through the agent
95 pipeline.status = "running"
96
97 return {
98 "pipeline_id": pipeline_id,
99 "status": "running",
100 "message": "Pipeline execution started"
101 }
102
103@router.get("/{pipeline_id}/status")
104async def get_pipeline_status(pipeline_id: str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected