public interface DifyWorkflowApiService
| 限定符和类型 | 方法和说明 |
|---|---|
retrofit2.Call<WorkflowLogListResponse> |
getWorkflowLogs(String keyword,
String status,
Integer page,
Integer limit)
获取workflow日志
|
retrofit2.Call<WorkflowRunStatusResponse> |
getWorkflowRunStatus(String workflowRunId)
获取workflow执行情况
|
retrofit2.Call<WorkflowRunResponse> |
runWorkflow(WorkflowRunRequest request) |
retrofit2.Call<okhttp3.ResponseBody> |
runWorkflowStream(WorkflowRunRequest request) |
retrofit2.Call<WorkflowStopResponse> |
stopWorkflow(String taskId,
SimpleUserRequest request)
停止workflow执行
|
@POST(value="workflows/run") retrofit2.Call<WorkflowRunResponse> runWorkflow(@Body WorkflowRunRequest request)
@POST(value="workflows/run")
@Streaming
retrofit2.Call<okhttp3.ResponseBody> runWorkflowStream(@Body
WorkflowRunRequest request)
@GET(value="workflows/run/{workflow_run_id}")
retrofit2.Call<WorkflowRunStatusResponse> getWorkflowRunStatus(@Path(value="workflow_run_id")
String workflowRunId)
workflowRunId - workflow执行ID@POST(value="workflows/tasks/{task_id}/stop")
retrofit2.Call<WorkflowStopResponse> stopWorkflow(@Path(value="task_id")
String taskId,
@Body
SimpleUserRequest request)
taskId - 任务ID,可在流式返回Chunk中获取request - 包含用户标识的请求体,必须和执行workflow接口传入的user保持一致@GET(value="workflows/logs") retrofit2.Call<WorkflowLogListResponse> getWorkflowLogs(@Query(value="keyword") String keyword, @Query(value="status") String status, @Query(value="page") Integer page, @Query(value="limit") Integer limit)
keyword - (可选)关键字status - (可选)执行状态:succeeded, failed, stopped, runningpage - (可选)当前页码,默认1limit - (可选)每页条数,默认20Copyright © 2025. All rights reserved.