Copy.ai
  1. 工作流程运行
Copy.ai
  • Copy.ai 工作流程 API 入门
  • API 接口
    • 身份验证
    • WEBHOOKS
      • 注册 Webhook
      • 获取 Webhook
      • 获取所有 Webhook
      • 删除 Webhook
    • 工作流程运行
      • 开始工作流程运行
        POST
      • 获取工作流运行
        GET
      • 获取所有工作流程运行
        GET
  1. 工作流程运行

获取工作流运行

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
GET
https://api.copy.ai/api/workflow/{workflow_id}/run/{run_id}

你可以通过API查看工作流运行的详细信息。
要查看一个工作流运行的详情,发送一个GET请求至 https://api.copy.ai/api/workflow/<workflow_id>/run/<run_id>。
你将收到一个响应,其中包含工作流运行的详细信息。

获取工作流运行

要查看工作流程运行,请将 GET 请求发送到。https://api.copy.ai/api/workflow/<workflow_id>/run/<run_id>

您将收到包含工作流程运行详细信息的响应。

例如:

JSON

{
	"status": "success",
	"data": {
		"status": "COMPLETE",
		"input": {
			"Input 1": "Inputs vary depending on the workflow used.",
      "Input 2": "The best way to see an example is to try it!"
		},
		"output": {
			"Output 1": "Outputs vary depending on the workflow used.",
			"Output 2": "The best way to see an example is to try it!"
		},
		"metadata": {
      "api": true
    },
		"createdAt": "2023-04-06T22:34:46.704Z",
		"id": "<run_id>",
		"credits": 2
	}
}

运行状态类型

地位描述
NEW工作流运行刚刚创建并准备好排队等待处理。
WAITING工作流运行正在等待满足所需的资源或条件,然后才能继续。
PROCESSING当前正在执行和处理工作流运行。
COMPLETE工作流运行已成功完成处理,并且所有步骤均已完成。
RETRYING工作流运行遇到问题,正在重试失败的步骤,然后再继续。
FAILED由于错误,工作流运行未能完成,进一步重试未成功。

跟踪/民意调查进度

该端点可用于实时检查工作流程运行的进度。

您可以通过在请求之间短暂延迟地重复调用端点来实现此目的。

当工作流运行完毕后,状态将更改为COMPLETE。

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.copy.ai/api/workflow//run/' \
--header 'x-copy-ai-api-key: key goes here' \
--header 'x-copy-ai-api-key;'
响应示例响应示例
200 - 成功示例
{
  "status": "success",
  "data": {
    "output": {
      "text": "workflow run output"
    },
    "metadata": {
      "interestingValue": "doublelyInterestingValue"
    },
    "createdAt": "2023-09-27T18:34:13.091Z",
    "id": "WRUN-dc46baf3-cb19-4424-be04-95ba630409bf",
    "workflowRunId": "WRUN-dc46baf3-cb19-4424-be04-95ba630409bf",
    "workflowId": "WCFG-84e56597-ebaf-4b49-a98c-75cacd4aecaa",
    "credits": 9001
  }
}

请求参数

Path 参数
workflow_id
string 
必需
run_id
string 
必需
Header 参数
x-copy-ai-api-key
string 
必需
示例值:
key goes here

返回响应

🟢200成功
application/json
Body
status
string 
必需
data
object 
必需
output
object 
必需
metadata
object 
必需
createdAt
string 
必需
id
string 
必需
workflowRunId
string 
必需
workflowId
string 
必需
credits
integer 
必需
🟠400请求有误
🟠404记录不存在
修改于 2023-12-26 09:51:36
上一页
开始工作流程运行
下一页
获取所有工作流程运行
Built with