Obtaining an Application Tree (V2)
Function
This API is used to obtain the application tree.
URI
GET /v2/cmdb/topology-trees/get-topology-trees
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
region_id |
No |
String |
Region ID. |
|
business_id |
Yes |
Long |
Application ID. |
|
env_tag_id |
No |
Long |
Environment tag. |
|
env_keyword |
No |
String |
Environment keyword. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
|
x-business-id |
Yes |
Long |
Application ID. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
topology_tree |
TopologyTree object |
Topology tree information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID of a node in the topology tree. |
|
parent |
String |
Parent node in the topology tree. |
|
real_id |
Long |
Actual ID of a node in the topology tree. |
|
name |
String |
Name of a node in the topology tree. |
|
display_name |
String |
Display name of a node in the topology tree. |
|
app_name |
String |
Component name. |
|
app_id |
Long |
Component ID. |
|
is_admin |
Boolean |
Whether the node is a management node. |
|
is_root |
Boolean |
Whether the node is a root node. |
|
business_id |
Long |
Application ID. |
|
node_type |
String |
Node type. |
|
region |
String |
Region. |
|
is_default |
Boolean |
Whether the node is a default node. |
Example Requests
Obtain the topology tree of application 108903 in region.
/v2/cmdb/topology-trees/get-topology-trees?business_id=108903®ion_id=
Example Responses
Status code: 200
OK: The request is successful.
{
"topology_tree": {
"tree": [
{
"default": true,
"admin": false,
"id": "108903",
"real_id": 108903,
"name": "LubanApm",
"display_name": "APM",
"is_admin": false,
"is_root": true,
"business_id": 108903,
"node_type": "BUSINESS",
"is_default": true
},
{
"default": false,
"admin": false,
"id": "108903-278718-139775",
"parent": "108903-278718",
"real_id": 139775,
"name": "apm-access",
"display_name": "apm-access",
"is_admin": false,
"is_root": false,
"business_id": 108903,
"node_type": "APPLICATION",
"is_default": false,
"data_source": "APM"
},
{
"default": false,
"admin": false,
"id": "108903-368579-343855",
"parent": "108903-368579",
"real_id": 343855,
"name": "consumer01",
"display_name": "consumer01",
"app_name": "dubbo2",
"app_id": 368579,
"is_admin": false,
"is_root": false,
"business_id": 108903,
"node_type": "ENVIRONMENT",
"is_default": false,
"region": " ",
"data_source": "APM",
"app_type": "JAVA"
},
]
}
}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot