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

Function update_pipeline

backend/app/api/pipelines.py:50–69  ·  view source on GitHub ↗

Update an existing pipeline.

(pipeline_id: str, update: PipelineUpdate)

Source from the content-addressed store, hash-verified

48
49@router.put("/{pipeline_id}", response_model=Pipeline)
50async def update_pipeline(pipeline_id: str, update: PipelineUpdate):
51 """Update an existing pipeline."""
52 if pipeline_id not in pipelines_store:
53 raise HTTPException(status_code=404, detail="Pipeline not found")
54
55 pipeline = pipelines_store[pipeline_id]
56
57 if update.name is not None:
58 pipeline.name = update.name
59 if update.description is not None:
60 pipeline.description = update.description
61 if update.urls is not None:
62 pipeline.urls = update.urls
63 if update.schema is not None:
64 pipeline.schema = update.schema
65 if update.code is not None:
66 pipeline.code = update.code
67
68 pipeline.updated_at = datetime.utcnow()
69 return pipeline
70
71@router.delete("/{pipeline_id}")
72async def delete_pipeline(pipeline_id: str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected