Help Center/ Application Service Mesh/ API Reference/ API/ Mesh APIs/ Obtaining the Namespace Injection Configuration of a Mesh
Updated on 2026-06-25 GMT+08:00

Obtaining the Namespace Injection Configuration of a Mesh

Function

This API is used to obtain the namespace injection configuration 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:getNamespace

    Read

    mesh *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    -

    -

URI

GET /v2/meshes/{mesh_id}/injection

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

mesh_id

Yes

String

Mesh ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

clusterId

String

Cluster ID

restartNamespacePod

Boolean

Whether to restart the workload in the namespace

InjectNamespaces

Array of strings

Namespaces where sidecars will be injected

allowNsInject

Boolean

Whether the namespace injection is allowed in the mesh configuration

namespaces

Map<String,Injection>

Namespace injection configuration details

errMsg

String

Error message

Table 4 Injection

Parameter

Type

Description

istioInjection

String

Whether to inject

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

errorCode

String

Error code

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

The namespace injection configuration of the mesh is obtained.

500

Internal error.

Error Codes

See Error Codes.