update workflow apis (#2066)
This commit is contained in:
@@ -437,12 +437,18 @@ async def get_runs(
|
|||||||
|
|
||||||
@base_router.get(
|
@base_router.get(
|
||||||
"/runs/{run_id}",
|
"/runs/{run_id}",
|
||||||
tags=["agent"],
|
tags=["Agent"],
|
||||||
response_model=RunResponse,
|
response_model=RunResponse,
|
||||||
|
description="Get a task or a workflow run by id",
|
||||||
|
summary="Get a task or a workflow run by id",
|
||||||
openapi_extra={
|
openapi_extra={
|
||||||
"x-fern-sdk-group-name": "agent",
|
"x-fern-sdk-group-name": "agent",
|
||||||
"x-fern-sdk-method-name": "get_run",
|
"x-fern-sdk-method-name": "get_run",
|
||||||
},
|
},
|
||||||
|
responses={
|
||||||
|
200: {"description": "Successfully got run"},
|
||||||
|
404: {"description": "Run not found"},
|
||||||
|
},
|
||||||
)
|
)
|
||||||
@base_router.get(
|
@base_router.get(
|
||||||
"/runs/{run_id}/",
|
"/runs/{run_id}/",
|
||||||
@@ -976,7 +982,7 @@ async def update_workflow(
|
|||||||
)
|
)
|
||||||
@legacy_base_router.delete("/workflows/{workflow_id}/", include_in_schema=False)
|
@legacy_base_router.delete("/workflows/{workflow_id}/", include_in_schema=False)
|
||||||
@base_router.post(
|
@base_router.post(
|
||||||
"/workflows/{workflow_id}",
|
"/workflows/{workflow_id}/delete",
|
||||||
tags=["Agent"],
|
tags=["Agent"],
|
||||||
openapi_extra={
|
openapi_extra={
|
||||||
"x-fern-sdk-group-name": "agent",
|
"x-fern-sdk-group-name": "agent",
|
||||||
@@ -986,6 +992,7 @@ async def update_workflow(
|
|||||||
summary="Delete a workflow",
|
summary="Delete a workflow",
|
||||||
responses={200: {"description": "Successfully deleted workflow"}},
|
responses={200: {"description": "Successfully deleted workflow"}},
|
||||||
)
|
)
|
||||||
|
@base_router.post("/workflows/{workflow_id}/delete/", include_in_schema=False)
|
||||||
async def delete_workflow(
|
async def delete_workflow(
|
||||||
workflow_id: str,
|
workflow_id: str,
|
||||||
current_org: Organization = Depends(org_auth_service.get_current_org),
|
current_org: Organization = Depends(org_auth_service.get_current_org),
|
||||||
@@ -1431,7 +1438,7 @@ async def _flatten_workflow_run_timeline(organization_id: str, workflow_run_id:
|
|||||||
|
|
||||||
|
|
||||||
@base_router.post(
|
@base_router.post(
|
||||||
"/tasks/run",
|
"/run/tasks",
|
||||||
tags=["Agent"],
|
tags=["Agent"],
|
||||||
openapi_extra={
|
openapi_extra={
|
||||||
"x-fern-sdk-group-name": "agent",
|
"x-fern-sdk-group-name": "agent",
|
||||||
@@ -1444,7 +1451,7 @@ async def _flatten_workflow_run_timeline(organization_id: str, workflow_run_id:
|
|||||||
400: {"description": "Invalid agent engine"},
|
400: {"description": "Invalid agent engine"},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@base_router.post("/tasks/run/", include_in_schema=False)
|
@base_router.post("/run/tasks/", include_in_schema=False)
|
||||||
async def run_task(
|
async def run_task(
|
||||||
request: Request,
|
request: Request,
|
||||||
background_tasks: BackgroundTasks,
|
background_tasks: BackgroundTasks,
|
||||||
@@ -1572,7 +1579,7 @@ async def run_task(
|
|||||||
|
|
||||||
|
|
||||||
@base_router.post(
|
@base_router.post(
|
||||||
"/workflows/run",
|
"/run/workflows",
|
||||||
tags=["Agent"],
|
tags=["Agent"],
|
||||||
openapi_extra={
|
openapi_extra={
|
||||||
"x-fern-sdk-group-name": "agent",
|
"x-fern-sdk-group-name": "agent",
|
||||||
@@ -1585,7 +1592,7 @@ async def run_task(
|
|||||||
400: {"description": "Invalid workflow run request"},
|
400: {"description": "Invalid workflow run request"},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@base_router.post("/workflows/run/", include_in_schema=False)
|
@base_router.post("/run/workflows/", include_in_schema=False)
|
||||||
async def run_workflow(
|
async def run_workflow(
|
||||||
request: Request,
|
request: Request,
|
||||||
background_tasks: BackgroundTasks,
|
background_tasks: BackgroundTasks,
|
||||||
|
|||||||
Reference in New Issue
Block a user