Queries the services of an application.

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/listAppServicesPage HTTP/1.1

Request parameters

Parameter Type Location Required Example Description
AppId String Query Yes 6dcc8c9e-d3da-478a-a066-86dcf820****

The ID of the application.

ServiceType String Query Yes springCloud

The type of the service. Valid values:

  • dubbo
  • springCloud
PageNumber Integer Query No 1

The number of the page to return

PageSize Integer Query No 9999

The number of entries to return on each page. Valid values: 0 to 9999.

Response parameters

Parameter Type Example Description
RequestId String 2583E089-99C2-562E-8B7E-73512136****

The ID of the request.

Message String success

The returned information.

TraceId String 0be3e0c816394483660457498e****

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

Data Array of Data

The details of microservices.

CurrentPage String 1

The page number of the current page.

TotalSize String 1

The total number of pages returned.

PageNumber String 1

The page number of the returned page.

PageSize String 9999

The number of entries returned per page. Valid values: 0 to 9999.

Result Array of MscAgentServiceResponse

The returned result.

EdasAppName String cn-zhangjiakou-micro-service-******

The name of the application.

Version String 1.0.0

The version of the service. You can create a custom version.

InstanceNum Long 1

The total number of instances.

EdasAppId String hc4fs1****@98314c8790b****

The ID of the application.

ServiceName String edas.service.provider

The name of the service.

Group String springCloud

The group to which the service belongs. You can create a custom group.

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/listAppServicesPage?AppId=6dcc8c9e-d3da-478a-a066-86dcf820****&ServiceType=springCloud&PageNumber=1&PageSize=9999 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

<ListAppServicesPageResponse>
    <RequestId>2583E089-99C2-562E-8B7E-73512136****</RequestId>
    <Message>success</Message>
    <TraceId>0be3e0c816394483660457498e****</TraceId>
    <Data>
        <CurrentPage>1</CurrentPage>
        <TotalSize>1</TotalSize>
        <PageNumber>1</PageNumber>
        <PageSize>9999</PageSize>
        <Result>
            <EdasAppName>cn-zhangjiakou-micro-service-******</EdasAppName>
            <Version>1.0.0</Version>
            <InstanceNum>1</InstanceNum>
            <EdasAppId>hc4fs1****@98314c8790b****</EdasAppId>
            <ServiceName>edas.service.provider</ServiceName>
            <Group>springCloud</Group>
        </Result>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</ListAppServicesPageResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "2583E089-99C2-562E-8B7E-73512136****",
  "Message" : "success",
  "TraceId" : "0be3e0c816394483660457498e****",
  "Data" : [ {
    "CurrentPage" : "1",
    "TotalSize" : "1",
    "PageNumber" : "1",
    "PageSize" : "9999",
    "Result" : [ {
      "EdasAppName" : "cn-zhangjiakou-micro-service-******",
      "Version" : "1.0.0",
      "InstanceNum" : 1,
      "EdasAppId" : "hc4fs1****@98314c8790b****",
      "ServiceName" : "edas.service.provider",
      "Group" : "springCloud"
    } ]
  } ],
  "Code" : "200",
  "Success" : true
}

Error codes

HttpCode Error code Error message Description
400 Micro.Service.NotFound The micro service not found {%s}. The error message returned because the specified service does not exist.
400 InvalidParameter.Obviously The specified parameter is invalid {%s}. The error message returned because the value of the {%s} parameter is invalid.

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