Queries Eureka services registered in a Microservices Engine (MSE) instance and returns paginated results.
Request syntax
{
"RegionId": "string",
"ClusterId": "string",
"PageNum": integer,
"PageSize": integer,
"RequestPars": "string",
"AcceptLanguage": "string"
}Request parameters
All parameters are passed as query parameters.
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | Yes | The ID of the region where the MSE instance resides. | cn-hangzhou |
| ClusterId | string | Yes | The ID of the MSE instance. | mse-09k1q11\*\*\*\* |
| PageNum | integer | Yes | The page number to return. Pages start from 1. | 1 |
| PageSize | integer | Yes | The number of entries per page. | 10 |
| RequestPars | string | No | Extended request parameters in JSON format. | {} |
| AcceptLanguage | string | No | The language of the response. Valid values: zh (Chinese), en (English). | zh |
Response syntax
{
"HttpCode": "string",
"TotalCount": integer,
"RequestId": "string",
"Message": "string",
"PageSize": integer,
"PageNumber": integer,
"Data": [
{
"Name": "string",
"InstancesId": ["string"],
"UpStatus": "string"
}
],
"ErrorCode": "string",
"Success": boolean
}Response elements
| Parameter | Type | Description | Example |
|---|---|---|---|
| HttpCode | string | The HTTP status code. | 202 |
| TotalCount | integer | The total number of entries returned. | 7 |
| RequestId | string | The request ID. Use this ID when you open a support ticket. | 316F5F64-F73D-42DC-8632-01E308B6\*\*\*\* |
| Message | string | The response message. | The request is successfully processed. |
| PageSize | integer | The number of entries per page. | 10 |
| PageNumber | integer | The current page number. | 1 |
| Data | array of objects | The list of Eureka services. See the Data object table. | - |
| ErrorCode | string | The error code. Returned only when the request fails. | mse-100-000 |
| Success | boolean | Whether the request succeeded. Valid values: true, false. | true |
Data object
| Parameter | Type | Description | Example |
|---|---|---|---|
| Name | string | The name of the Eureka service. | CONTACTINFO |
| InstancesId | array of strings | The IDs of the instances where the service is registered. | mse-cn-st21ri2\*\*\*\* |
| UpStatus | string | The ratio of healthy instances to total instances, in the format healthy/total. | 1/1 |
RAM authorization
To call this API operation, make sure the RAM user or RAM role has the following permission in a RAM policy.
| Action | Access level | Resource |
|---|---|---|
| mse:ListEurekaServices | Read | MSEacs:mse:{#regionId}:{#accountId}:instance/* |
Examples
Request parameters
RegionId=cn-hangzhou
ClusterId=mse-09k1q11****
PageNum=1
PageSize=10Response (JSON)
{
"HttpCode": "202",
"TotalCount": 7,
"RequestId": "316F5F64-F73D-42DC-8632-01E308B6****",
"Message": "The request is successfully processed.\n",
"PageSize": 10,
"PageNumber": 1,
"Data": [
{
"InstancesId": [
"mse-cn-st21ri2****"
],
"Name": "CONTACTINFO",
"UpStatus": "1/1"
}
],
"ErrorCode": "mse-100-000",
"Success": true
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | duplicatedClusterAliasName | duplicated cluster alias name | The instance name already exists. Use a different name. |
| 400 | illegalRequest | illegal request:%s | The request is invalid. Check the request format and parameters. |
| 400 | invalidParameter | parameter error:%s | A request parameter is invalid. Check the parameter values. |
| 403 | NoPermission | You are not authorized to perform this operation. | The RAM user or role lacks the required permission. Grant the mse:ListEurekaServices permission. |
| 404 | clusterNotFound | cluster not found | The specified MSE instance does not exist. Verify the ClusterId value. |
| 500 | systemError | system error | An internal error occurred. Try again later. |
| 500 | regcenterError | register center error:%s | The service registry returned an error. Check the instance status and try again. |
For the complete list of error codes, see API error center.