Queries the list of microservices.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| sae:ListAppServices | list | *All Resources * |
| none |
Request syntax
GET /pop/v1/sam/service/listAppServices HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| AppId | string | No | The ID of the application. You must specify only one of the following parameters: vpcId, namespace ID, and application ID. | 017f39b8-dfa4-4e16-a84b-1dcee4b1**** |
| ServiceType | string | No | The service type. Valid values:
| springCloud |
| RegistryType | string | No | The registry type. Valid values:
| 0 |
| NacosInstanceId | string | No | The ID of the MSE Nacos instance. This parameter is required when the registry type is set to MSE Nacos. | mse-cn-sco3r0u**** |
| NacosNamespaceId | string | No | The ID of the MSE Nacos namespace. This parameter is required when the registry type is set to MSE Nacos. | mse-test |
| PageNumber | integer | No | The page number of the returned page. | 1 |
| PageSize | integer | No | The number of entries per page. | 10 |
| VpcId | string | No | The unique identifier of the VPC. You must specify only one of the following parameters: VPC ID, namespace ID, and application ID. | vpc-2ze0i263cnn311nvj**** |
| NamespaceId | string | No | The ID of the namespace. You must specify only one of the following parameters: VPC ID, namespace ID, and application ID. | cn-beijing:test |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": [
{
"ServiceName": "frontend",
"ServiceGroup": "DEFAULT_GROUP",
"ServiceVersion": "1.0.0",
"InstanceCount": 1,
"ServiceType": "springCloud",
"ServiceProtocol": "HTTP",
"ServicePorts": [
8000
],
"ServicePortAndProtocol": {
"key": "8000:TCP"
},
"RegistryType": 0,
"NamespaceId": "cn-beijing:test",
"NamespaceName": "",
"AppId": "0099b7be-5f5b-4512-a7fc-56049ef1****",
"AppName": "demo-app",
"SecurityGroupId": "sg-wz969ngg2e49q5i4****"
}
],
"ErrorCode": "",
"Code": 200,
"Success": true
}Error codes
| HTTP status code | Error code | Error message |
|---|---|---|
| 400 | Micro.Service.NotFound | The micro service not found {%s}. |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. |
For a list of error codes, visit the Service error codes.
