导出工作流运行记录(受限预览)
curl --request POST \
--url https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"application_id": "app_abc123",
"run_ids": [
"run_xyz789"
],
"format": "excel",
"report_mode": "merged",
"include_failed_runs": false,
"max_text_length": 10000
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 'app_abc123',
run_ids: ['run_xyz789'],
format: 'excel',
report_mode: 'merged',
include_failed_runs: false,
max_text_length: 10000
})
};
fetch('https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export"
payload = {
"application_id": "app_abc123",
"run_ids": ["run_xyz789"],
"format": "excel",
"report_mode": "merged",
"include_failed_runs": False,
"max_text_length": 10000
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": \"app_abc123\",\n \"run_ids\": [\n \"run_xyz789\"\n ],\n \"format\": \"excel\",\n \"report_mode\": \"merged\",\n \"include_failed_runs\": false,\n \"max_text_length\": 10000\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export';
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 'app_abc123',
run_ids: ['run_xyz789'],
format: 'excel',
report_mode: 'merged',
include_failed_runs: false,
max_text_length: 10000
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export"
payload := strings.NewReader("{\n \"application_id\": \"app_abc123\",\n \"run_ids\": [\n \"run_xyz789\"\n ],\n \"format\": \"excel\",\n \"report_mode\": \"merged\",\n \"include_failed_runs\": false,\n \"max_text_length\": 10000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
request.AddJsonBody("{\n \"application_id\": \"app_abc123\",\n \"run_ids\": [\n \"run_xyz789\"\n ],\n \"format\": \"excel\",\n \"report_mode\": \"merged\",\n \"include_failed_runs\": false,\n \"max_text_length\": 10000\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_id' => 'app_abc123',
'run_ids' => [
'run_xyz789'
],
'format' => 'excel',
'report_mode' => 'merged',
'include_failed_runs' => false,
'max_text_length' => 10000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "<string>",
"message": "<string>",
"tips": "<string>",
"data": {
"file_id": "<string>",
"download_url": "<string>",
"filename": "<string>",
"file_size": 1,
"format": "excel",
"report_mode": "merged",
"total_runs": 100,
"included_runs": 100,
"skipped_runs": 100,
"run_summaries": [
{
"run_id": "<string>",
"status": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"included_nodes": 1,
"skipped_nodes": 1
}
],
"export_time": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}工作流
导出工作流运行记录(受限预览)
将指定工作流运行记录导出为 Excel、Word、Markdown 或 JSON,并返回临时下载地址及运行摘要。公开合同要求显式提供至少一个 run_id,不开放后端“空列表导出应用全部运行”的兼容行为。
当前实现单次最多处理 200 个运行、最多生成 500,000 行,临时文件通常约 1 小时有效。受限预览:路由只校验 API Key 和租户,没有独立的管理员角色或应用可见性校验。仅可在受控租户中,由管理员导出自己确认有权访问的 application_id 和 run_ids。导出内容可能包含工作流输入、节点输出和业务数据;下载后应按原始数据等级保护。
POST
/
open
/
agentic_engine
/
laiye
/
v1
/
app
/
runs
/
export
导出工作流运行记录(受限预览)
curl --request POST \
--url https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"application_id": "app_abc123",
"run_ids": [
"run_xyz789"
],
"format": "excel",
"report_mode": "merged",
"include_failed_runs": false,
"max_text_length": 10000
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 'app_abc123',
run_ids: ['run_xyz789'],
format: 'excel',
report_mode: 'merged',
include_failed_runs: false,
max_text_length: 10000
})
};
fetch('https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export"
payload = {
"application_id": "app_abc123",
"run_ids": ["run_xyz789"],
"format": "excel",
"report_mode": "merged",
"include_failed_runs": False,
"max_text_length": 10000
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": \"app_abc123\",\n \"run_ids\": [\n \"run_xyz789\"\n ],\n \"format\": \"excel\",\n \"report_mode\": \"merged\",\n \"include_failed_runs\": false,\n \"max_text_length\": 10000\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export';
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 'app_abc123',
run_ids: ['run_xyz789'],
format: 'excel',
report_mode: 'merged',
include_failed_runs: false,
max_text_length: 10000
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export"
payload := strings.NewReader("{\n \"application_id\": \"app_abc123\",\n \"run_ids\": [\n \"run_xyz789\"\n ],\n \"format\": \"excel\",\n \"report_mode\": \"merged\",\n \"include_failed_runs\": false,\n \"max_text_length\": 10000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
request.AddJsonBody("{\n \"application_id\": \"app_abc123\",\n \"run_ids\": [\n \"run_xyz789\"\n ],\n \"format\": \"excel\",\n \"report_mode\": \"merged\",\n \"include_failed_runs\": false,\n \"max_text_length\": 10000\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_engine/laiye/v1/app/runs/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_id' => 'app_abc123',
'run_ids' => [
'run_xyz789'
],
'format' => 'excel',
'report_mode' => 'merged',
'include_failed_runs' => false,
'max_text_length' => 10000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "<string>",
"message": "<string>",
"tips": "<string>",
"data": {
"file_id": "<string>",
"download_url": "<string>",
"filename": "<string>",
"file_size": 1,
"format": "excel",
"report_mode": "merged",
"total_runs": 100,
"included_runs": 100,
"skipped_runs": 100,
"run_summaries": [
{
"run_id": "<string>",
"status": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"included_nodes": 1,
"skipped_nodes": 1
}
],
"export_time": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}授权
用于调用工作流接口的 API Key。
请求体
application/json
工作流应用 ID。
Minimum string length:
1明确授权导出的运行 ID。公共合同不允许 null 或空数组导出全部运行。
Required array length:
1 - 200 elementsMinimum string length:
1可选的节点 ID 列表;省略时包含运行中的全部可导出节点。
Minimum string length:
1可用选项:
excel, word, markdown, json merged 合并为一份报告;per_run 按运行拆分。
可用选项:
merged, per_run 可选的工作流输入变量名,用作导出主键。
单个文本值导出的最大字符数;当前路由实际默认 10000。
必填范围:
1 <= x <= 30000