All Products
Search
Document Center

Microservices Engine:ListAnsServiceClusters

Last Updated:Jun 10, 2026

Mengkueri kluster dari layanan Pusat Registrasi Nacos.

Deskripsi operasi

Catatan

The operation is not provided in Nacos SDKs. For information about Nacos SDKs, see the official documentation.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

PageNum

integer

Yes

Nomor halaman yang akan dikembalikan.

1

PageSize

integer

Yes

Jumlah entri yang akan dikembalikan pada setiap halaman.

10

ClusterId deprecated

string

No

ID Kluster MSE.

Catatan

Kluster MSE berbeda dengan kluster layanan Pusat Registrasi Nacos.

mse-09k1xxxx

ServiceName

string

No

Nama layanan.

nacos.test.3

GroupName

string

No

Nama kelompok.

DEFAULT_GROUP

NamespaceId

string

No

ID namespace.

12233****

ClusterName

string

No

Alias kluster.

qewr

InstanceId

string

No

ID Instans.

mse_prepaid_public_cn-tl32a6****

AcceptLanguage

string

No

Bahasa tanggapan. Nilai valid:

  • zh: Mandarin

  • en: Inggris.

zh

Elemen respons

Element

Type

Description

Example

object

The response parameters.

Message

string

The message returned.

The request is successfully processed.

RequestId

string

The ID of the request.

52BA6DA6-A702-4362-A32F-DFF79655****

Data

object

The data returned.

ProtectThreshold

number

The protection threshold.

0

GroupName

string

The service group to which the service belongs.

DEFAULT_GROUP

Clusters

array<object>

The cluster information.

array<object>

The data structure.

DefaultCheckPort

integer

The default port used for a health check.

80

HealthCheckerType

string

The type of the health check.

tcp

UseIPPort4Check

boolean

Indicates whether an end-to-end health check was initiated by the server. This parameter is valid only if the service is not a temporary service.

true

ServiceName

string

The full name of the service.

DEFAULT_GROUP@@nacos.test.3

Name

string

The cluster name.

test

DefaultPort

integer

The default port.

80

Metadata

object

The metadata of the cluster.

111

Name

string

The name of the service.

nacos.test.3

SelectorType

string

The election mode.

none

Metadata

object

The metadata of the service.

111

Ephemeral

boolean

Indicates whether the service is a temporary service. Valid values:

  • true: yes

  • false: no

true

Source

string

The source type of the service. Valid values:

  • console: The service was registered in the console.

  • sdk: The service was registered by using the SDK.

  • governance: The service was registered on Microservices Governance.

console

AppDetail

object

The information about the associated application for which Microservices Governance is enabled when the Source parameter is set to governance.

AppId

string

The ID of the application for which Microservices Governance is enabled.

hkhon1po62@904cba2c0xxxxxx

AppName

string

The name of the application for which Microservices Governance is enabled.

spring-cloud-b

Port

integer

The port number of the application for which Microservices Governance is enabled.

6001

CheckType

string

The type of the health check. Valid values:

  • connection: connection status check

  • tcp: TCP connection check

  • http: HTTP connection check

tcp

CheckPath

string

The path of the health check. This parameter is required only when the CheckType parameter is set to http.

/health

CheckTimeout

integer

The timeout period of the health check response. Unit: seconds.

5

CheckInternal

integer

The health check interval. Unit: seconds.

2

HealthyCheckTimes

integer

The maximum number of health check retries when the instance state changes from unhealthy to healthy.

2

UnhealthyCheckTimes

integer

The maximum number of health check retries when the instance state changes from healthy to unhealthy.

2

ErrorCode

string

The error code returned if the request failed.

mse-100-000

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

HttpCode

string

The HTTP status code.

200

Contoh

Respons sukses

JSONformat

{
  "Message": "The request is successfully processed.",
  "RequestId": "52BA6DA6-A702-4362-A32F-DFF79655****",
  "Data": {
    "ProtectThreshold": 0,
    "GroupName": "DEFAULT_GROUP",
    "Clusters": [
      {
        "DefaultCheckPort": 80,
        "HealthCheckerType": "tcp",
        "UseIPPort4Check": true,
        "ServiceName": "DEFAULT_GROUP@@nacos.test.3",
        "Name": "test",
        "DefaultPort": 80,
        "Metadata": 111
      }
    ],
    "Name": "nacos.test.3",
    "SelectorType": "none",
    "Metadata": 111,
    "Ephemeral": true,
    "Source": "console",
    "AppDetail": {
      "AppId": "hkhon1po62@904cba2c0xxxxxx",
      "AppName": "spring-cloud-b",
      "Port": 6001,
      "CheckType": "tcp",
      "CheckPath": "/health",
      "CheckTimeout": 5,
      "CheckInternal": 2,
      "HealthyCheckTimes": 2,
      "UnhealthyCheckTimes": 2
    }
  },
  "ErrorCode": "mse-100-000",
  "Success": true,
  "HttpCode": "200"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalRequest Invalid request:%s
400 InvalidParameter Parameter error:%s
500 InternalError Console error. Try again later:%s
403 NoPermission You are not authorized to perform this operation:%s
404 NotFound Not found:%s

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.