查询 Webhook 投递日志
curl --request POST \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhook_id": "webhook_abc123",
"start_time": "2026-08-01 00:00:00",
"end_time": "2026-08-02 00:00:00",
"page": 1,
"page_size": 20
}
'const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
start_time: '2026-08-01 00:00:00',
end_time: '2026-08-02 00:00:00',
page: 1,
page_size: 20
})
};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs"
payload = {
"webhook_id": "webhook_abc123",
"start_time": "2026-08-01 00:00:00",
"end_time": "2026-08-02 00:00:00",
"page": 1,
"page_size": 20
}
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_doc_processor/{tenant_name}/v1/webhook/logs")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_id\": \"webhook_abc123\",\n \"start_time\": \"2026-08-01 00:00:00\",\n \"end_time\": \"2026-08-02 00:00:00\",\n \"page\": 1,\n \"page_size\": 20\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
start_time: '2026-08-01 00:00:00',
end_time: '2026-08-02 00:00:00',
page: 1,
page_size: 20
})
};
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_doc_processor/{tenant_name}/v1/webhook/logs"
payload := strings.NewReader("{\n \"webhook_id\": \"webhook_abc123\",\n \"start_time\": \"2026-08-01 00:00:00\",\n \"end_time\": \"2026-08-02 00:00:00\",\n \"page\": 1,\n \"page_size\": 20\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_doc_processor/{tenant_name}/v1/webhook/logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"webhook_id\": \"webhook_abc123\",\n \"start_time\": \"2026-08-01 00:00:00\",\n \"end_time\": \"2026-08-02 00:00:00\",\n \"page\": 1,\n \"page_size\": 20\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_doc_processor/{tenant_name}/v1/webhook/logs",
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([
'webhook_id' => 'webhook_abc123',
'start_time' => '2026-08-01 00:00:00',
'end_time' => '2026-08-02 00:00:00',
'page' => 1,
'page_size' => 20
]),
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;
}{
"data": {
"logs": [
{
"id": "<string>",
"webhook_id": "<string>",
"webhook_url": "<string>",
"event_type": "doc_parse_completed",
"status": "pending",
"retry_count": 1,
"app_id": "<string>",
"app_name": "<string>",
"next_retry_at": "2023-11-07T05:31:56Z",
"response_code": 123,
"response_body": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"total": 1,
"page": 2,
"page_size": 50
},
"code": "<string>",
"message": "<string>",
"tips": "<string>"
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}Webhook
查询 Webhook 投递日志
查询 Webhook 投递结果。默认返回最近 72 小时,单次时间范围最多 30 天;response_body 最多保留约 2000 个字符,可能包含接收端返回的业务或敏感信息。
当前服务按租户范围查询日志,而不是按创建 Webhook 的用户二次隔离。该接口只应由受控租户的管理员 API Key 使用,并应尽量传 webhook_id 收窄范围。不要向普通终端用户暴露日志响应。
POST
/
open
/
agentic_doc_processor
/
{tenant_name}
/
v1
/
webhook
/
logs
查询 Webhook 投递日志
curl --request POST \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhook_id": "webhook_abc123",
"start_time": "2026-08-01 00:00:00",
"end_time": "2026-08-02 00:00:00",
"page": 1,
"page_size": 20
}
'const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
start_time: '2026-08-01 00:00:00',
end_time: '2026-08-02 00:00:00',
page: 1,
page_size: 20
})
};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs"
payload = {
"webhook_id": "webhook_abc123",
"start_time": "2026-08-01 00:00:00",
"end_time": "2026-08-02 00:00:00",
"page": 1,
"page_size": 20
}
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_doc_processor/{tenant_name}/v1/webhook/logs")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_id\": \"webhook_abc123\",\n \"start_time\": \"2026-08-01 00:00:00\",\n \"end_time\": \"2026-08-02 00:00:00\",\n \"page\": 1,\n \"page_size\": 20\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/webhook/logs';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: 'webhook_abc123',
start_time: '2026-08-01 00:00:00',
end_time: '2026-08-02 00:00:00',
page: 1,
page_size: 20
})
};
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_doc_processor/{tenant_name}/v1/webhook/logs"
payload := strings.NewReader("{\n \"webhook_id\": \"webhook_abc123\",\n \"start_time\": \"2026-08-01 00:00:00\",\n \"end_time\": \"2026-08-02 00:00:00\",\n \"page\": 1,\n \"page_size\": 20\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_doc_processor/{tenant_name}/v1/webhook/logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"webhook_id\": \"webhook_abc123\",\n \"start_time\": \"2026-08-01 00:00:00\",\n \"end_time\": \"2026-08-02 00:00:00\",\n \"page\": 1,\n \"page_size\": 20\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_doc_processor/{tenant_name}/v1/webhook/logs",
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([
'webhook_id' => 'webhook_abc123',
'start_time' => '2026-08-01 00:00:00',
'end_time' => '2026-08-02 00:00:00',
'page' => 1,
'page_size' => 20
]),
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;
}{
"data": {
"logs": [
{
"id": "<string>",
"webhook_id": "<string>",
"webhook_url": "<string>",
"event_type": "doc_parse_completed",
"status": "pending",
"retry_count": 1,
"app_id": "<string>",
"app_name": "<string>",
"next_retry_at": "2023-11-07T05:31:56Z",
"response_code": 123,
"response_body": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"total": 1,
"page": 2,
"page_size": 50
},
"code": "<string>",
"message": "<string>",
"tips": "<string>"
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}授权
生产环境 API Key,可在 ADP 平台的「我的 API」中查看。请确保 API Key 有效且属于生产环境。
路径参数
租户名称,默认 laiye。
请求体
application/json
Webhook 配置 ID;建议始终提供以收窄日志查询范围。
起始时间,格式 YYYY-MM-DD HH:mm:ss。省略时默认为结束时间前 72 小时。
Pattern:
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$结束时间,格式 YYYY-MM-DD HH:mm:ss。省略时为当前时间。
Pattern:
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$必填范围:
x >= 1必填范围:
1 <= x <= 100