Help Center/ Application Service Mesh/ API Reference/ API/ Service APIs/ Repairing a Mesh Service with Just One Click
Updated on 2026-06-25 GMT+08:00

Repairing a Mesh Service with Just One Click

Function

This API is used to repair a mesh service with just one click.

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:updateService

    Write

    mesh *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    -

    -

URI

POST /v2/meshes/{mesh_id}/namespaces/{namespace}/services/format

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

mesh_id

Yes

String

Mesh ID

namespace

Yes

String

Namespace

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.

Content-Type

Yes

String

Message body type (format)

Range:

  • application/json;charset=utf-8: The content is in JSON format and encoded using UTF-8.

  • application/json: The content is in JSON format.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

validations

No

Array of ServiceValidation objects

Service validation result list of a mesh

Table 4 ServiceValidation

Parameter

Mandatory

Type

Description

serviceName

Yes

String

Service name

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

formattings

Array of ServiceFormatting objects

Service repair result list of a mesh

Table 6 ServiceFormatting

Parameter

Type

Description

serviceName

String

Name of a mesh service

servicePorts

Array of ServicePort objects

Port of a mesh service

result

String

Service repair result of a mesh

errMsg

String

Service repair error message of a mesh

items

Array of FormattingItem objects

Service repair result of a mesh

Table 7 ServicePort

Parameter

Type

Description

port

String

Service port

protocol

String

Service protocol

sniHosts

Array of strings

Service SNI hosts

Table 8 FormattingItem

Parameter

Type

Description

name

String

Repair item name

result

String

Repair result

errMsg

String

Error cause

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

errorCode

String

Error code

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

The mesh service is repaired. The repair result is returned.

500

Internal error.

Error Codes

See Error Codes.