Help Center/ Application Service Mesh/ API Reference/ API/ Mesh Topology/ Obtaining Mesh Application Topology Data
Updated on 2026-06-25 GMT+08:00

Obtaining Mesh Application Topology Data

Function

This API is used to obtain the application topology data of a mesh.

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.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    asm:mesh:getTopology

    Read

    mesh *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    -

    -

URI

GET /api/graph

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

duration

Yes

Integer

Time span of the obtained topology, in seconds

graphType

Yes

String

Type of the obtained topology

namespaces

Yes

String

Namespace to be displayed. If there are multiple namespaces, separate them with commas (,).

metric

Yes

String

Metric to be displayed

queryTime

Yes

String

Time point for obtaining the topology

Request Parameters

Table 2 Request header 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

Table 3 Response body parameters

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

Table 4 Edge

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

Table 5 Node

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

Table 6 Traffic

Parameter

Type

Description

protocol

String

Protocol name

rates

Map<String,String>

Access rate

responeseTime

String

Response time

Status code: 500

Table 7 Response body parameters

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 application topology data of the mesh is returned.

500

An internal error occurred during topology data construction.

Error Codes

See Error Codes.