调用DescribeAppServiceDetail接口获取应用服务的元数据详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。更多信息,请参见公共请求和返回头

请求语法

GET /pop/v1/sam/service/describeAppServiceDetail HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
AppId String Query 6dcc8c9e-d3da-478a-a066-86dcf820****

应用ID。

ServiceType String Query springCloud

服务类型。取值说明如下:

  • dubbo
  • springCloud
ServiceGroup String Query springCloud

服务分组。自定义。

ServiceVersion String Query 1.0.0

服务版本。自定义。

ServiceName String Query edas.service.provider

服务名称。

返回数据

名称 类型 示例值 描述
RequestId String B2C7874F-F109-5B34-8618-2C10BBA2****

请求ID。

Message String success

调用结果的附加信息。

TraceId String 0b16399316402420740034918e****

调用链ID,用于精确查询调用信息。

Data Object

返回数据。

Group String springCloud

服务分组。自定义。

ServiceName String service-provider

服务名称。

Version String 1.0.0

服务版本。自定义。

ServiceType String springCloud

服务类型。取值说明如下:

  • dubbo
  • springCloud
EdasAppName String cn-zhangjiakou-micro-service-******

应用名称。

Metadata Map

元数据。示例如下:{side: "provider", port: "18081", preserved: {register: {source: "SPRING_CLOUD"}},…}

SpringApplicationName String service-provider

Spring Cloud应用名称。

DubboApplicationName String service-consumer

Dubbo应用名称。

Methods Array of Method

方法列表。

MethodController String com.serverless.sae.controller.EchoController

所属类。

ReturnType String java.lang.String

返回类型。

ReturnDetails String test

返回详情。

Name String echo

方法名。

NameDetail String description

方法详情。

ParameterDetails Array of String description

参数详情。

RequestMethods Array of String ALL

请求方法。取值说明如下:

  • GET
  • ALL
ParameterTypes Array of String ["java.lang.String"]

参数类型。

Paths Array of String ["/echo/{str}"]

请求路径。格式如下:

/path
ParameterDefinitions Array of ParameterDefinition

参数定义。

Type String java.lang.String

参数类型。

Description String description

参数描述。

Name String arg0

参数名称。

ErrorCode String

错误码。取值说明如下:

  • 请求成功:不返回ErrorCode字段。
  • 请求失败:返回ErrorCode字段。具体信息,请参见本文的错误码列表。
Code String 200

接口状态或POP错误码。取值说明如下:

  • 2xx:成功。
  • 3xx:重定向。
  • 4xx:请求错误。
  • 5xx:服务器错误。
Success Boolean true

是否成功获取元数据。取值说明如下:

  • true:获取成功。
  • false:获取失败。

示例

请求示例

GET /pop/v1/sam/service/describeAppServiceDetail?AppId=6dcc8c9e-d3da-478a-a066-86dcf820****&ServiceType=springCloud&ServiceGroup=springCloud&ServiceVersion=1.0.0&ServiceName=edas.service.provider HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json

正常返回示例

XML格式

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

<DescribeAppServiceDetailResponse>
    <RequestId>B2C7874F-F109-5B34-8618-2C10BBA2****</RequestId>
    <Message>success</Message>
    <TraceId>0b16399316402420740034918e****</TraceId>
    <Data>
        <Group>springCloud</Group>
        <ServiceName>service-provider</ServiceName>
        <Version>1.0.0</Version>
        <ServiceType>springCloud</ServiceType>
        <EdasAppName>cn-zhangjiakou-micro-service-******</EdasAppName>
        <SpringApplicationName>service-provider</SpringApplicationName>
        <DubboApplicationName>service-consumer</DubboApplicationName>
        <Methods>
            <MethodController>com.serverless.sae.controller.EchoController</MethodController>
            <ReturnType>java.lang.String</ReturnType>
            <ReturnDetails>test</ReturnDetails>
            <Name>echo</Name>
            <NameDetail>description</NameDetail>
            <ParameterDetails>description</ParameterDetails>
            <RequestMethods>ALL</RequestMethods>
            <ParameterTypes>["java.lang.String"]</ParameterTypes>
            <Paths>["/echo/{str}"]</Paths>
            <ParameterDefinitions>
                <Type>java.lang.String</Type>
                <Description>description</Description>
                <Name>arg0</Name>
            </ParameterDefinitions>
        </Methods>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</DescribeAppServiceDetailResponse>

JSON格式

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

{
  "RequestId" : "B2C7874F-F109-5B34-8618-2C10BBA2****",
  "Message" : "success",
  "TraceId" : "0b16399316402420740034918e****",
  "Data" : {
    "Group" : "springCloud",
    "ServiceName" : "service-provider",
    "Version" : "1.0.0",
    "ServiceType" : "springCloud",
    "EdasAppName" : "cn-zhangjiakou-micro-service-******",
    "SpringApplicationName" : "service-provider",
    "DubboApplicationName" : "service-consumer",
    "Methods" : [ {
      "MethodController" : "com.serverless.sae.controller.EchoController",
      "ReturnType" : "java.lang.String",
      "ReturnDetails" : "test",
      "Name" : "echo",
      "NameDetail" : "description",
      "ParameterDetails" : [ "description" ],
      "RequestMethods" : [ "ALL" ],
      "ParameterTypes" : [ "[\"java.lang.String\"]" ],
      "Paths" : [ "[\"/echo/{str}\"]" ],
      "ParameterDefinitions" : [ {
        "Type" : "java.lang.String",
        "Description" : "description",
        "Name" : "arg0"
      } ]
    } ]
  },
  "Code" : "200",
  "Success" : true
}

错误码

HttpCode 错误码 错误信息 描述
400 Micro.Service.MetaData.NotFound The micro service metadata not found {%s}. 微服务原信息不存在
400 InvalidParameter.Obviously The specified parameter is invalid {%s}. 不合法的参数{%s}。

访问错误中心查看更多错误码。