最新巡检状态
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/publisher/probes/latestimport requests
url = "https://api-datahub.bazhuayu.com/v1/publisher/probes/latest"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/publisher/probes/latest', 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/publisher/probes/latest', 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/publisher/probes/latest"
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/publisher/probes/latest")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.com/v1/publisher/probes/latest",
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/publisher/probes/latest")
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/publisher/probes/latest");
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/publisher/probes/latest")
.get()
.build()
val response = client.newCall(request).execute()false{
"items": [
{
"namespace": "<string>",
"app_name": "<string>",
"app_version": "<string>",
"verdict": "<string>",
"skip_reason": "<string>",
"examples": 123,
"passed": 123,
"error": {
"code": "<string>",
"category": "<string>",
"message": "<string>",
"retryable": true
},
"kind": "<string>",
"checked_at": "<string>",
"finished_at": "<string>"
}
]
}发布与运营
最新巡检状态
我每个 App 最近一轮巡检折叠成的单一结论,最差的在前。
GET
/
v1
/
publisher
/
probes
/
latest
最新巡检状态
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/publisher/probes/latestimport requests
url = "https://api-datahub.bazhuayu.com/v1/publisher/probes/latest"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/publisher/probes/latest', 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/publisher/probes/latest', 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/publisher/probes/latest"
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/publisher/probes/latest")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.com/v1/publisher/probes/latest",
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/publisher/probes/latest")
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/publisher/probes/latest");
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/publisher/probes/latest")
.get()
.build()
val response = client.newCall(request).execute()false{
"items": [
{
"namespace": "<string>",
"app_name": "<string>",
"app_version": "<string>",
"verdict": "<string>",
"skip_reason": "<string>",
"examples": 123,
"passed": 123,
"error": {
"code": "<string>",
"category": "<string>",
"message": "<string>",
"retryable": true
},
"kind": "<string>",
"checked_at": "<string>",
"finished_at": "<string>"
}
]
}端点
GET https://api-datahub.bazhuayu.com/v1/publisher/probes/latest
Authorization: Bearer <API Key>)。
我每个 App 最近一轮巡检批次折叠成一个 App 级结论(任一示例失败即 FAIL,其次 TIMEOUT、NO_DATA,批次进行中为 PENDING,全部通过为 PASS,什么都没跑为 SKIPPED),附第一个失败示例的错误。回答的是「现在有没有东西坏了」。从未被巡检的 App 不出现。最差的在前,再按应用名排。
请求
查询参数
string[]
只看这些 App,可重复传。
示例请求
curl \
-H "Authorization: Bearer $BAZHUAYU_API_KEY" \
"https://api-datahub.bazhuayu.com/v1/publisher/probes/latest"
响应
200 成功
{
"data": {
"items": []
}
}
data 字段中,其内容如下。
object[]
错误
| HTTP | code | category | 说明 |
|---|---|---|---|
| 401 | unauthorized | forbidden | 缺少或无效的 API Key。 |
| 404 | app-not-found | not_found | App 不存在、已改名,或对当前凭证不可见(私有 / 分享范围之外)。 |
{"error": {code, category, message, retryable}},见错误。
