Queries the microservices that are subscribed.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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/listConsumedServices 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:

  • If the call is successful, success is returned.
  • If the call fails, an error code is returned.
TraceId String 0a98a02315955564772843261e****

The ID of the trace. The ID is used to query the details of a request.

Data Array of ListConsumedServices

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 published service.

Version String 1.0.0

The version of the published service

AppId String b2a8a925-477a-4ed7-b825-d5e22500****

The ID of the application.

Group2Ip String {}

A reserved parameter.

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:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the "Error codes" section of this topic.
Code String 200

The HTTP status code. Valid values:

  • 2xx: indicates that the call was successful.
  • 3xx: indicates that the call was redirected.
  • 4xx: indicates that the call failed.
  • 5xx: indicates that a server error occurred.
Success Boolean true

Indicates whether the microservice list was obtained. Valid values:

  • true: The list was obtained.
  • false: The list failed to be obtained.

Examples

Sample requests

GET /pop/v1/sam/service/listConsumedServices?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

<ListConsumedServicesResponse>
    <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>
</ListConsumedServicesResponse>

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

For a list of error codes, visit the API Error Center.