Queries the microservices that are published.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request and response headers.
Request syntax
GET /pop/v1/sam/service/listPublishedServices HTTP/1.1
Request parameters
Parameter | Type | Location | Required | Example | Description |
---|---|---|---|---|---|
AppId | String | Query | Yes | b2a8a925-477a-4ed7-b825-d5e22500**** | The ID of the application. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** | The ID of the request. |
Message | String | success | The returned information. Valid values:
|
TraceId | String | 0a98a02315955564772843261e**** | The ID of the trace. It is used to query the details of a request. |
Data | Array of Data | The details of the microservices. |
|
Type | String | RPC | The type of the published service. |
Groups | Array of String | HSF | The service group that corresponds to the consumed service. |
Version | String | 1.0.0 | The version of the published services. |
AppId | String | b2a8a925-477a-4ed7-b825-d5e22500**** | The ID of the application. |
Group2Ip | String | {} | The reserved parameter. This parameter does not take effect. |
Ips | Array of String | 10.0.0.1 | The subscription address of the service. |
Name | String | com.alibaba.nodejs.ItemService | The name of the published service. |
ErrorCode | String | Empty | The returned error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the microservice list was obtained. Valid values:
|
Examples
Sample requests
GET /pop/v1/sam/service/listPublishedServices?AppId=b2a8a925-477a-4ed7-b825-d5e22500**** HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListPublishedServicesResponse>
<RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<Type>RPC</Type>
<Groups>HSF</Groups>
<Version>1.0.0</Version>
<AppId>b2a8a925-477a-4ed7-b825-d5e22500****</AppId>
<Group2Ip>{}</Group2Ip>
<Ips>10.0.0.1</Ips>
<Name>com.alibaba.nodejs.ItemService</Name>
</Data>
<Code>200</Code>
<Success>true</Success>
</ListPublishedServicesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : [ {
"Type" : "RPC",
"Groups" : [ "HSF" ],
"Version" : "1.0.0",
"AppId" : "b2a8a925-477a-4ed7-b825-d5e22500****",
"Group2Ip" : "{}",
"Ips" : [ "10.0.0.1" ],
"Name" : "com.alibaba.nodejs.ItemService"
} ],
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | The error message returned because the value of the {%s} parameter is invalid. |
400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | The error message returned because the value of the %s parameter is invalid. This parameter cannot be left empty. |
For a list of error codes, visit the API Error Center.