Obtaining Mesh Service Topology Data
Function
This API is used to obtain the topology data of the associated service of a mesh service.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
URI
GET /api/namespaces/{namespace}/services/{service}/graph
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| namespace | Yes | String | Namespace of the associated service to be queried |
| service | Yes | String | Name of the associated service to be queried |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| duration | Yes | Integer | Time span of the obtained topology, in seconds |
| queryTime | Yes | String | Time point for obtaining the topology |
| graphType | Yes | String | Type of the obtained topology |
| metric | Yes | String | Metric to be displayed |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Mesh-ID | Yes | String | ID of the mesh whose topology needs to be obtained |
| X-Clusters-List | Yes | String | Cluster ID set, which is separated by commas (,) |
| Instance-Map | Yes | String | Instance information is separated by colons (:). This parameter can reduce the request response time. Example: Id:Region:Type:ProjectID |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| edges | Array of Edge objects | Edge data of the mesh application topology |
| nodes | Array of Node objects | Point data of the mesh application topology |
| Parameter | Type | Description |
|---|---|---|
| id | String | Mesh topology edge ID |
| source | String | Start node ID of the mesh topology edge |
| target | String | End node ID of the mesh topology edge |
| traffic | Traffic object | Traffic information of the connection represented by the mesh topology edge |
| Parameter | Type | Description |
|---|---|---|
| id | String | ID of a topology node |
| parent | String | ID of the parent node of a composite node in the topology |
| nodeType | String | Type of a topology node |
| cluster | String | Cluster where a topology node is located |
| namespace | String | Namespace of a topology node |
| pod | String | Name of the service instance on a topology node |
| version | String | Version of a topology node |
| service | String | Service of a topology node |
| isBox | Boolean | Whether the topology node is a frame |
| traffic | Traffic object | Traffic of a topology node |
| Parameter | Type | Description |
|---|---|---|
| protocol | String | Protocol name |
| rates | Map<String,String> | Access rate |
| responeseTime | String | Response time |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Example Requests
None
Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | The topology data of the associated service of the mesh service is returned. |
| 500 | An internal error occurred during topology data construction. |
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