查询应用全局拓扑图
功能介绍
查询应用级别全局拓扑图信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
POST /v1/apm2/openapi/topology/business-search
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
从IAM服务获取的用户Token。 |
x-business-id |
是 |
Long |
应用id。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
node_list |
Array of TopoNode objects |
组件节点列表。 |
line_list |
Array of TopoLine objects |
组件之间调用指向线列表。 |
collector_config |
Map<String,CollectorConfigModel> |
采集器配置。 |
real_start_time |
Long |
开始时间。 |
real_end_time |
Long |
结束时间。 |
参数 |
参数类型 |
描述 |
---|---|---|
node_type |
String |
节点类型。 |
node_name |
String |
节点名称。 |
node_id |
String |
节点id。 |
env_id |
Long |
环境id。 |
参数 |
参数类型 |
描述 |
---|---|---|
from_node |
String |
开始节点。 |
to_node |
String |
结束节点。 |
direction |
String |
指向。 |
collector |
String |
采集器名称。 |
target_env_id |
Long |
环境id。 |
hints |
Map<String,String> |
线条上的提示信息。 |
filter_value |
String |
过滤值。 |
参数 |
参数类型 |
描述 |
---|---|---|
line_view_config |
LineViewConfigModel object |
指向线视图配置。 |
detail_view_config |
DetailViewConfigModel object |
详情视图配置。 |
参数 |
参数类型 |
描述 |
---|---|---|
metric_set |
String |
视图对应的指标集的名称。 |
filter_prefix |
String |
过滤参数。 |
line_view_item_list |
Array of LineViewItem objects |
视图函数集合。 |
参数 |
参数类型 |
描述 |
---|---|---|
metric_set |
String |
视图对应的指标集的名称。 |
filter_prefix |
String |
过滤参数。 |
detail_view_item_list |
Array of DetailViewItem objects |
视图函数集合。 |
请求示例
查询目标应用ID为6,开始时间戳为1667462525000,结束时间戳为1667463725000的应用全局拓扑图信息。
/v1/apm2/openapi/topology/business-search { "direction" : "", "end_time" : 1667463725000, "start_time" : 1667462525000, "filter_user" : true, "target_business_id" : 6, "env_tag_list" : [ ] }
响应示例
状态码: 200
OK,请求响应成功。
{ "node_list" : [ { "node_type" : "Env", "node_name" : "apm-task:xx-xxxx-xxx", "node_id" : "55", "env_id" : 55 }, { "node_type" : "Env", "node_name" : "apm-api:xx-xxxx-xxx", "node_id" : "45", "env_id" : 45 }, { "node_type" : "Env", "node_name" : "apm-archive:xx-xxxx-xxx", "node_id" : "4394", "env_id" : 4394 }, { "node_type" : "Env", "node_name" : "apm-store:xx-xxxx-xxx-az1", "node_id" : "46", "env_id" : 46 }, { "node_type" : "Env", "node_name" : "apm-store:xx-xxxx-xxx", "node_id" : "47", "env_id" : 47 }, { "node_type" : "Env", "node_name" : "apm-api:xx-xxxx-xxx-az1", "node_id" : "48", "env_id" : 48 }, { "node_type" : "Env", "node_name" : "apm-pu-task:xx-xxxx-xxx-az1", "node_id" : "4396", "env_id" : 4396 }, { "node_type" : "Env", "node_name" : "apm-pu-task:xx-xxxx-xxx", "node_id" : "4397", "env_id" : 4397 }, { "node_type" : "Env", "node_name" : "apm-deliver:xx-xxxx-xxx", "node_id" : "1104", "env_id" : 1104 }, { "node_type" : "Env", "node_name" : "apm-merge:xx-xxxx-xxx", "node_id" : "3568", "env_id" : 3568 }, { "node_type" : "Mysql", "node_name" : "Mysql", "node_id" : "Mysql", "env_id" : null }, { "node_type" : "Env", "node_name" : "apm-alarm:xx-xxxx-xxx", "node_id" : "913", "env_id" : 913 }, { "node_type" : "Env", "node_name" : "config-web:xx-xxxx-xxx", "node_id" : "51", "env_id" : 51 }, { "node_type" : "Env", "node_name" : "user", "node_id" : "user", "env_id" : null }, { "node_type" : "Env", "node_name" : "apm-access:xx-xxxx-xxx-AZ1", "node_id" : "42", "env_id" : 42 }, { "node_type" : "Env", "node_name" : "apm-master:xx-xxxx-xxx", "node_id" : "53", "env_id" : 53 }, { "node_type" : "Env", "node_name" : "apm-front:xx-xxxx-xxx", "node_id" : "54", "env_id" : 54 }, { "node_type" : "Env", "node_name" : "apm-access:xx-xxxx-xxx", "node_id" : "43", "env_id" : 43 } ], "line_list" : [ { "from_node" : "user", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "0.09", "count" : "272", "error" : "0" }, "filter_value" : "user" }, { "from_node" : "47", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "10.28", "count" : "780", "error" : "0" }, "filter_value" : "47" }, { "from_node" : "4394", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "29.49", "count" : "694", "error" : "0" }, "filter_value" : "4394" }, { "from_node" : "46", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "10.41", "count" : "843", "error" : "0" }, "filter_value" : "46" }, { "from_node" : "4397", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "41.54", "count" : "175", "error" : "0" }, "filter_value" : "4397" }, { "from_node" : "48", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "39.47", "count" : "47", "error" : "0" }, "filter_value" : "48" }, { "from_node" : "4396", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "36.15", "count" : "167", "error" : "0" }, "filter_value" : "4396" }, { "from_node" : "51", "to_node" : "Mysql", "direction" : "out", "collector" : "Mysql", "target_env_id" : 51, "hints" : { "rt" : "1.12", "count" : "97402", "error" : "14" }, "filter_value" : "Mysql" }, { "from_node" : "1104", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "0.98", "count" : "156", "error" : "0" }, "filter_value" : "1104" }, { "from_node" : "913", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "64.91", "count" : "686", "error" : "0" }, "filter_value" : "913" }, { "from_node" : "3568", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "30.67", "count" : "563", "error" : "0" }, "filter_value" : "3568" }, { "from_node" : "54", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "1.86", "count" : "682", "error" : "0" }, "filter_value" : "54" }, { "from_node" : "43", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "1.03", "count" : "409", "error" : "0" }, "filter_value" : "43" }, { "from_node" : "42", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "1.26", "count" : "401", "error" : "0" }, "filter_value" : "42" }, { "from_node" : "53", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "3.78", "count" : "1035", "error" : "0" }, "filter_value" : "53" }, { "from_node" : "45", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "31.25", "count" : "48", "error" : "0" }, "filter_value" : "45" }, { "from_node" : "55", "to_node" : "51", "direction" : "in", "collector" : "Url", "target_env_id" : 51, "hints" : { "rt" : "1.13", "count" : "94", "error" : "0" }, "filter_value" : "55" } ], "collector_config" : { "Mysql" : { "line_view_config" : { "metric_set" : "total", "filter_prefix" : null, "line_view_item_list" : [ { "function" : "SUM(invokeCount)", "as" : "count" }, { "function" : "SUM(totalTime)/SUM(invokeCount)", "as" : "rt" }, { "function" : "SUM(errorCount)", "as" : "errorCount" } ] }, "detail_view_config" : { "metric_set" : "connection", "group_by" : "db", "detail_view_item_list" : [ { "function" : "SUM(invokeCount)", "as" : "count" }, { "function" : "SUM(totalTime)/SUM(invokeCount)", "as" : "rt" }, { "function" : "SUM(errorCount)", "as" : "errorCount" } ] } }, "Url" : { "line_view_config" : { "metric_set" : "user", "filter_prefix" : "clusterId=", "line_view_item_list" : [ { "function" : "SUM(invokeCount)", "as" : "count" }, { "function" : "SUM(totalTime)/SUM(invokeCount)", "as" : "rt" }, { "function" : "SUM(errorCount)", "as" : "errorCount" } ] }, "detail_view_config" : null } }, "real_start_time" : 1667465696000, "real_end_time" : 1667466896000 }
状态码
状态码 |
描述 |
---|---|
200 |
OK,请求响应成功。 |
400 |
Bad Request,语义或参数有误。 |
401 |
Unauthorized,没有权限。 |
403 |
Forbidden,禁止访问。 |
404 |
Not Found,没有找到要请求的资源。 |
错误码
请参见错误码。