Querying the Topology of a Component Environment
Function
This API is used to query the topology of a component environment.
URI
POST /v1/apm2/openapi/topology/env-search
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token obtained from IAM. |
x-business-id | Yes | Long | Application ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
target_env_id | Yes | Long | Environment ID. |
direction | No | String | Direction, which can be left empty. |
end_time | Yes | String | End time. |
start_time | Yes | String | Start time. |
filter_user | No | Boolean | Filter or not. |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
node_list | Array of TopoNode objects | List of component nodes. |
line_list | Array of TopoLine objects | List of lines that indicate invocations between components. |
collector_config | Map<String,CollectorConfigModel> | Collector configuration. |
real_start_time | Long | Start time. |
real_end_time | Long | End time. |
Parameter | Type | Description |
---|---|---|
node_type | String | Node type. |
node_name | String | Node name. |
node_id | String | Node ID. |
env_id | Long | Environment ID. |
Parameter | Type | Description |
---|---|---|
from_node | String | Start node. |
to_node | String | End node. |
direction | String | Invocation direction. |
collector | String | Collector name. |
target_env_id | Long | Environment ID. |
hints | Map<String,String> | Line prompt. |
filter_value | String | Filtered value. |
Parameter | Type | Description |
---|---|---|
line_view_config | LineViewConfigModel object | Invocation line view configuration. |
detail_view_config | DetailViewConfigModel object | Details view configuration. |
Parameter | Type | Description |
---|---|---|
metric_set | String | Name of the metric set corresponding to the view. |
filter_prefix | String | Filtering parameter. |
line_view_item_list | Array of LineViewItem objects | View function set. |
Parameter | Type | Description |
---|---|---|
function | String | Expression. |
as | String | As. |
Parameter | Type | Description |
---|---|---|
metric_set | String | Name of the metric set corresponding to the view. |
filter_prefix | String | Filtering parameter. |
detail_view_item_list | Array of DetailViewItem objects | View function set. |
Parameter | Type | Description |
---|---|---|
function | String | Expression. |
as | String | As. |
Example Requests
Query the global topology of environment 4394, with the start timestamp set to 1667465258000 and end timestamp set to 1667466458000.
/v1/apm2/openapi/topology/env-search{"direction" : "","end_time" : 1667466458000,"start_time" : 1667465258000,"filter_user" : false,"target_env_id" : 4394}
Example Responses
Status code: 200
OK: The request is successful.
{"node_list" : [ {"node_type" : "Env","node_name" : "apm-archive:","node_id" : "4394","env_id" : 4394}, {"node_type" : "Kafka","node_name" : "Kafka","node_id" : "Kafka","env_id" : null}, {"node_type" : "Env","node_name" : "config-web:","node_id" : "1927","env_id" : 1927}, {"node_type" : "Env","node_name" : "config-web:","node_id" : "51","env_id" : 51}, {"node_type" : "Env","node_name" : "user","node_id" : "user","env_id" : null} ],"line_list" : [ {"from_node" : "user","to_node" : "4394","direction" : "in","collector" : "Url","target_env_id" : 4394,"hints" : {"rt" : "0.09","count" : "680","error" : "0"},"filter_value" : "user"}, {"from_node" : "4394","to_node" : "51","direction" : "out","collector" : "HttpClient","target_env_id" : 4394,"hints" : {"rt" : "33.27","count" : "668","error" : "0"},"filter_value" : "51"}, {"from_node" : "Kafka","to_node" : "4394","direction" : "in","collector" : "KafkaConsumer","target_env_id" : 4394,"hints" : {"bytes" : "-1448635860","count" : "4163226"},"filter_value" : "Kafka"}, {"from_node" : "4394","to_node" : "Kafka","direction" : "out","collector" : "KafkaProducer","target_env_id" : 4394,"hints" : {"bytes" : "0","count" : "0"},"filter_value" : "Kafka"}, {"from_node" : "4394","to_node" : "1927","direction" : "out","collector" : "HttpClient","target_env_id" : 4394,"hints" : {"rt" : "41.64","count" : "170","error" : "0"},"filter_value" : "1927"} ],"collector_config" : {"KafkaProducer" : {"line_view_config" : {"metric_set" : "total","filter_prefix" : null,"line_view_item_list" : [ {"function" : "SUM(recordSendTotal)","as" : "count"}, {"function" : "SUM(byteTotal)","as" : "bytes"} ]},"detail_view_config" : {"metric_set" : "topic","group_by" : "topic","detail_view_item_list" : [ {"function" : "SUM(recordSendTotal)","as" : "count"}, {"function" : "SUM(byteTotal)","as" : "bytes"} ]}},"HttpClient" : {"line_view_config" : {"metric_set" : "hostInvocation","filter_prefix" : "envId=","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},"KafkaConsumer" : {"line_view_config" : {"metric_set" : "total","filter_prefix" : null,"line_view_item_list" : [ {"function" : "SUM(recordConsumedTotal)","as" : "count"}, {"function" : "SUM(bytesConsumedTotal)","as" : "bytes"} ]},"detail_view_config" : {"metric_set" : "topic","group_by" : "topic","detail_view_item_list" : [ {"function" : "SUM(recordConsumedTotal)","as" : "count"}, {"function" : "SUM(bytesConsumedTotal)","as" : "bytes"} ]}},"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" : 1667465258000,"real_end_time" : 1667466458000}
Status Codes
Status Code | Description |
---|---|
200 | OK: The request is successful. |
400 | Bad Request: Semantic or parameter error. |
401 | Unauthorized: No permissions. |
403 | Forbidden: Access forbidden. |
404 | Not Found: The requested resource is not found. |
Error Codes
See Error Codes.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Requests
- Example Responses
- Status Codes
- Error Codes