上游调用留痕详情
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}import requests
url = "https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
val client = OkHttpClient()
val request = Request.Builder()
.url("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}")
.get()
.build()
val response = client.newCall(request).execute()false{
"call_id": 123,
"attempt": 123,
"seq": 123,
"stage": "<string>",
"method": "<string>",
"url": "<string>",
"status_code": 123,
"error": "<string>",
"duration_ms": 123,
"response_truncated": true,
"created_at": "<string>",
"request": {},
"response_body": "<string>"
}运行与结果
上游调用留痕详情
读取单条上游调用的完整请求与响应内容。
GET
/
v1
/
runs
/
{run_id}
/
upstream-calls
/
{call_id}
上游调用留痕详情
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}import requests
url = "https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
val client = OkHttpClient()
val request = Request.Builder()
.url("https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}")
.get()
.build()
val response = client.newCall(request).execute()false{
"call_id": 123,
"attempt": 123,
"seq": 123,
"stage": "<string>",
"method": "<string>",
"url": "<string>",
"status_code": 123,
"error": "<string>",
"duration_ms": 123,
"response_truncated": true,
"created_at": "<string>",
"request": {},
"response_body": "<string>"
}端点
GET https://api-datahub.bazhuayu.com/v1/runs/{run_id}/upstream-calls/{call_id}
404。
单条留痕的完整现场:请求(query / body)与响应体。响应体过大时在写入侧已截断,见 response_truncated。鉴权规则与列表端点相同。
请求
路径参数
string
必填
调试运行的标识。
integer
必填
留痕条目标识,来自列表的
items[].call_id。示例请求
curl \
-H "Authorization: Bearer $BAZHUAYU_API_KEY" \
"https://api-datahub.bazhuayu.com/v1/runs/run_c62bc0fb8df2/upstream-calls/1"
响应
200 成功
{
"data": {
"call_id": 0,
"attempt": 0,
"seq": 0,
"stage": "string",
"method": "string",
"url": "string",
"status_code": 0,
"error": "string",
"duration_ms": 0,
"response_truncated": false,
"created_at": "string",
"request": {},
"response_body": "string"
}
}
data 字段中,其内容如下。
integer
必填
—
integer
必填
—
integer
必填
—
string
必填
—
string
必填
—
string
必填
—
integer
—
string
—
integer
—
boolean
响应体是否在写入时被截断。
string
必填
—
object
请求内容(query / headers / body,敏感值已打码)。
string
上游响应体。
错误
| HTTP | code | category | 说明 |
|---|---|---|---|
| 401 | unauthorized | forbidden | 缺少或无效的 API Key。 |
| 404 | upstream-calls-not-found | not_found | 只有调试运行(run_kind=test)保留上游调用留痕;生产运行、他人的运行与不存在的运行都返回此错误。 |
{"error": {code, category, message, retryable}},见错误。
