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

Function update_schema

backend/app/api/workflow.py:86–106  ·  view source on GitHub ↗

Manually update schema in the workflow.

(
    pipeline_id: str,
    schema_fields: List[SchemaFieldUpdate],
    manager: WorkflowManager = Depends(get_manager)
)

Source from the content-addressed store, hash-verified

84
85@router.post("/workflow/{pipeline_id}/schema")
86async def update_schema(
87 pipeline_id: str,
88 schema_fields: List[SchemaFieldUpdate],
89 manager: WorkflowManager = Depends(get_manager)
90):
91 """Manually update schema in the workflow."""
92 try:
93 workflow = await manager.update_schema(
94 pipeline_id,
95 [field.dict() for field in schema_fields],
96 user="user"
97 )
98 return {
99 "success": True,
100 "workflow": workflow.dict(),
101 "message": f"Updated schema with {len(schema_fields)} fields"
102 }
103 except ValueError as e:
104 raise HTTPException(status_code=404, detail=str(e))
105 except Exception as e:
106 raise HTTPException(status_code=500, detail=str(e))
107
108
109@router.post("/workflow/{pipeline_id}/approve")

Callers

nothing calls this directly

Calls 1

update_schemaMethod · 0.80

Tested by

no test coverage detected