获取拓扑摘要
curl --request POST \
--url 'https://api.flashcat.cloud/monit/servicemap/summary?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"anchor": {
"host_id": "host_0123456789abcdef0123456789abcdef"
}
}
'import requests
url = "https://api.flashcat.cloud/monit/servicemap/summary?app_key="
payload = { "anchor": { "host_id": "host_0123456789abcdef0123456789abcdef" } }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({anchor: {host_id: 'host_0123456789abcdef0123456789abcdef'}})
};
fetch('https://api.flashcat.cloud/monit/servicemap/summary?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/monit/servicemap/summary?app_key=",
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([
'anchor' => [
'host_id' => 'host_0123456789abcdef0123456789abcdef'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/monit/servicemap/summary?app_key="
payload := strings.NewReader("{\n \"anchor\": {\n \"host_id\": \"host_0123456789abcdef0123456789abcdef\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/monit/servicemap/summary?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"anchor\": {\n \"host_id\": \"host_0123456789abcdef0123456789abcdef\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/servicemap/summary?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"anchor\": {\n \"host_id\": \"host_0123456789abcdef0123456789abcdef\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"network_scope_id": "ns_0123456789abcdef0123456789abcdef",
"anchor_host_id": "host_0123456789abcdef0123456789abcdef",
"status": "active",
"authoritative": true,
"graph_role": "current",
"latest_collection_authoritative": true,
"observed_at_ms": 1784635556072,
"received_at_ms": 1784635557272,
"freshness": {
"status": "fresh",
"newest_received_at_ms": 1784635557272,
"oldest_received_at_ms": 1784635557272,
"max_age_ms": 1200
},
"coverage": {
"direction": "outbound",
"hosts_loaded": 2,
"degraded_hosts": 0,
"truncated_hosts": 0,
"capture_modes": [
"ebpf"
],
"network_inventory_status": "complete",
"kubernetes_enrichment_status": "unavailable"
},
"truncated": false,
"resolution_counts": {
"resolved": 1,
"ambiguous": 0,
"unresolved": 0
},
"neighbors": [
{
"edge_id": "edge_v1_example",
"source_entity_id": "procw_v1_source",
"source_display_name": "orders.service",
"resolution_status": "resolved",
"target_host_id": "host_fedcba9876543210fedcba9876543210",
"target_entity_id": "procw_v1_mysql",
"target_display_name": "mysqld.service",
"destination_protocol": "tcp",
"destination_ip": "203.0.113.105",
"destination_port": 3306,
"last_seen": "2026-07-21T18:45:56.072+08:00",
"active_connections": 1
}
],
"context_ref_detail": "ServiceMap current bounded evidence: anchor_host_id=host_0123456789abcdef0123456789abcdef; observed_at_ms=1784635556072; received_at_ms=1784635557272; latest_health_at_ms=0; status=active; freshness=fresh; graph_authoritative=true; latest_collection_authoritative=true; coverage_hosts=2; resolution_counts=resolved:1,ambiguous:0,unresolved:0; truncated=false. Observed outbound relations (relations_shown=1/1): [orders.service -> mysqld.service, resolution=resolved, last_seen=2026-07-21T18:45:56.072+08:00] Evidence rules: only resolution=resolved relations are certain; treat ambiguous/unresolved relations as leads to verify, not fact."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "ServiceUnavailable",
"message": "servicemap store is not initialized"
}
}服务拓扑
获取拓扑摘要
返回某台主机出向服务依赖的有界摘要,专为 AI 场景准备。
POST
/
monit
/
servicemap
/
summary
获取拓扑摘要
curl --request POST \
--url 'https://api.flashcat.cloud/monit/servicemap/summary?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"anchor": {
"host_id": "host_0123456789abcdef0123456789abcdef"
}
}
'import requests
url = "https://api.flashcat.cloud/monit/servicemap/summary?app_key="
payload = { "anchor": { "host_id": "host_0123456789abcdef0123456789abcdef" } }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({anchor: {host_id: 'host_0123456789abcdef0123456789abcdef'}})
};
fetch('https://api.flashcat.cloud/monit/servicemap/summary?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/monit/servicemap/summary?app_key=",
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([
'anchor' => [
'host_id' => 'host_0123456789abcdef0123456789abcdef'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/monit/servicemap/summary?app_key="
payload := strings.NewReader("{\n \"anchor\": {\n \"host_id\": \"host_0123456789abcdef0123456789abcdef\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/monit/servicemap/summary?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"anchor\": {\n \"host_id\": \"host_0123456789abcdef0123456789abcdef\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/servicemap/summary?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"anchor\": {\n \"host_id\": \"host_0123456789abcdef0123456789abcdef\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"network_scope_id": "ns_0123456789abcdef0123456789abcdef",
"anchor_host_id": "host_0123456789abcdef0123456789abcdef",
"status": "active",
"authoritative": true,
"graph_role": "current",
"latest_collection_authoritative": true,
"observed_at_ms": 1784635556072,
"received_at_ms": 1784635557272,
"freshness": {
"status": "fresh",
"newest_received_at_ms": 1784635557272,
"oldest_received_at_ms": 1784635557272,
"max_age_ms": 1200
},
"coverage": {
"direction": "outbound",
"hosts_loaded": 2,
"degraded_hosts": 0,
"truncated_hosts": 0,
"capture_modes": [
"ebpf"
],
"network_inventory_status": "complete",
"kubernetes_enrichment_status": "unavailable"
},
"truncated": false,
"resolution_counts": {
"resolved": 1,
"ambiguous": 0,
"unresolved": 0
},
"neighbors": [
{
"edge_id": "edge_v1_example",
"source_entity_id": "procw_v1_source",
"source_display_name": "orders.service",
"resolution_status": "resolved",
"target_host_id": "host_fedcba9876543210fedcba9876543210",
"target_entity_id": "procw_v1_mysql",
"target_display_name": "mysqld.service",
"destination_protocol": "tcp",
"destination_ip": "203.0.113.105",
"destination_port": 3306,
"last_seen": "2026-07-21T18:45:56.072+08:00",
"active_connections": 1
}
],
"context_ref_detail": "ServiceMap current bounded evidence: anchor_host_id=host_0123456789abcdef0123456789abcdef; observed_at_ms=1784635556072; received_at_ms=1784635557272; latest_health_at_ms=0; status=active; freshness=fresh; graph_authoritative=true; latest_collection_authoritative=true; coverage_hosts=2; resolution_counts=resolved:1,ambiguous:0,unresolved:0; truncated=false. Observed outbound relations (relations_shown=1/1): [orders.service -> mysqld.service, resolution=resolved, last_seen=2026-07-21T18:45:56.072+08:00] Evidence rules: only resolution=resolved relations are certain; treat ambiguous/unresolved relations as leads to verify, not fact."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "ServiceUnavailable",
"message": "servicemap store is not initialized"
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 30 次/分钟;2 次/秒 |
| 权限要求 | 服务拓扑查看(monit) |
使用说明
- 服务拓扑是可选子系统:未配置
redis.servicemap的部署会返回ServiceUnavailable。 anchor.host_id必须已被服务拓扑感知,否则返回ResourceNotFound。- 本接口是固定大小的摘要,而非
POST /monit/servicemap/topology的缩小版:深度固定为 1,相邻关系上限固定为 12 条,调用方均不可调整。 context_ref_detail是为大模型提示词预先渲染好的自然语言证据摘要文本;结构化字段才是权威来源,该字段只是对其的便捷呈现。graph_role=last_known_good表示最新一次采集不健康,摘要改为基于上一份权威拓扑而非实时数据。
授权
在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。
请求体
application/json
此页面对您有帮助吗?
⌘I