全部产品

查询已发布 API 的运行定义

更新时间:2019-03-04 18:18:22

描述

查询指定API在指定环境中正在运行的定义,是真正在指定环境中生效的定义,可能跟正在编辑中的定义不同。

  • 此功能面向开放API的用户
  • 用于查询某指定API已经发布到某指定环境的定义,即环境中正在运行的定义,这一版定义可能和正在修改中的定义不同。只有将修改后定义重新发布到某环境,才会覆盖该API在该环境的运行中定义。

请求参数

名称 类型 是否必须 描述
Action String 操作接口名,系统规定参数,取值:DescribeDeployedApi
GroupId String 指定的分组编号
ApiId String 指定的API编号
StageName String 环境名称,可选值:
  • RELEASE:线上
  • TEST:测试

返回参数

名称 类型 描述
RequestId String 本次请求编号
RegionId String 所在的region
GroupId String API分组编号
GroupName String API分组名称
StageName String 环境名称,可选值:
  • RELEASE:线上
  • TEST:测试
ApiId String API编号
ApiName String API名称
Description String API描述
Visibility String 可见性,取值为:PUBLIC、PRIVATE,分别表示公开、私有
AuthType String 安全认证方式,取值为:APP、ANONYMOUS、APPOPENID,分别表示阿里云APP、匿名、第三方账号认证OpenID Connect
ResultType String 返回类型
ResultSample String 返回示例
FailResultSample String 后端服务失败返回应答的示例
DeployedTime String 发布时间(格林威治时间)/td>
ErrorCodeSamples ErrorCodeSample 后端服务返回的错误码示例,详情见ApiAttributesType.md#ErrorCodeSamples
RequestConfig RequestConfig 由 RequestConfig 组成的格式,返回API前端定义信息
ServiceConfig ServiceConfig 由 ServiceConfig 组成的格式,返回API调用后端服务信息
SystemParameters SystemParameter 由 SystemParameter 组成的数组格式,返回API中调用后端服务时系统入参信息项
ConstantParameters ConstantParameter 由 ConstantParameter 组成的数组格式,返回API中调用后端服务时常量入参信息项
RequestParameters RequestParameter 由 RequestParameter 组成的数组格式,返回API中前端入参信息项
ServiceParameters ServiceParameter 由 ServiceParameter 组成的数组格式,返回API中调用后端服务时常量入参信息项
ServiceParametersMap ServiceParameterMap 由 ServiceParameterMap 组成的数组格式,返回API中前后端参数映射关系
OpenIdConnectConfig OpenIdConnectConfig 第三方账号认证OpenID Connect相关配置项,详情见ApiAttributesType.md#OpenIdConnectConfig
FunctionComputeConfig FunctionComputeConfig 后端为函数计算时的后端配置项

示例

请求示例

  1. https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeDeployedApi
  2. &ApiId=3b81fd160f5645e097cc8855d75a1cf6
  3. &StageName=RELEASE
  4. &<公共请求参数>

返回示例

XML格式

  1. <DescribeDeployedApiResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ004</RequestId>
  3. <RegionId>cn-qingdao</RegionId>
  4. <GroupId>0009db9c828549768a200320714b8930</GroupId>
  5. <GroupName>myGroup2</GroupName>
  6. <StageName>RELEASE</StageName>
  7. <ApiId>3b81fd160f5645e097cc8855d75a1cf6</ApiId>
  8. <ApiName>creatobject</ApiName>
  9. <Description>对象创建</Description>
  10. <Visibility>public</Visibility>
  11. <AuthType>APP</AuthType>
  12. <ResultType>application/json</ResultType>
  13. <ResultSample></ResultSample>
  14. <FailResultSample></FailResultSample>
  15. <DeployedTime>2016-07-23T08:28:48Z</DeployedTime>
  16. <RequestConfig>
  17. <RequestProtocol>HTTP</RequestProtocol>
  18. <RequestHttpMethod>GET</RequestHttpMethod>
  19. <RequestPath>/mypath/creatobject</RequestPath>
  20. <BodyFormat>FORM</BodyFormat>
  21. <PostBodyDescription>对象</PostBodyDescription>
  22. </RequestConfig>
  23. <ServiceConfig>
  24. <ServiceProtocol>HTTP/HTTPS</ServiceProtocol>
  25. <ServiceAddress>http://api.a.com:8080</ServiceAddress>
  26. <ServiceHttpMethod>GET</ServiceHttpMethod>
  27. <ServicePath>/object/add</ServicePath>
  28. <ServiceTimeout>2000</ServiceTimeout>
  29. <Mock>FALSE</Mock>
  30. </ServiceConfig>
  31. <SystemParameters>
  32. <SystemParameter>
  33. <ParameterName>CaRequestId</ParameterName>
  34. <ServiceParameterName>RequestId</ServiceParameterName>
  35. <Location>HEAD</Location>
  36. <DemoValue>0A964636-F7A3-4F1A-92D7-135584A6397F</DemoValue>
  37. <Description>请求编号</Description>
  38. </SystemParameter>
  39. <SystemParameter>
  40. <ParameterName>CaAppId</ParameterName>
  41. <ServiceParameterName>AppId</ServiceParameterName>
  42. <Location>QUERY</Location>
  43. <DemoValue>0A964636-F7A3-4F1A-92D7-135584A6398F</DemoValue>
  44. <Description>请求者应用编号</Description>
  45. </SystemParameter>
  46. </SystemParameters>
  47. <ConstantParameters>
  48. <ConstantParameter>
  49. <ServiceParameterName>ConstantKey1</ServiceParameterName>
  50. <ConstantValue>helloworld</ConstantValue>
  51. <Location>QUERY</Location>
  52. <Description>Desc</Description>
  53. </ConstantParameter>
  54. </ConstantParameters>
  55. <RequestParameters>
  56. <RequestParameter>
  57. <ApiParameterName>RequestKey1</ApiParameterName>
  58. <Location>QUERY</Location>
  59. <ParameterType>String</ParameterType>
  60. <Required>REQUIRED</Required>
  61. <DefaultValue></DefaultValue>
  62. <DemoValue>demo1</DemoValue>
  63. <MaxValue></MaxValue>
  64. <MinValue></MinValue>
  65. <MaxLength>100</MaxLength>
  66. <MinLength>3</MinLength>
  67. <RegularExpression></RegularExpression>
  68. <JsonScheme></JsonScheme>
  69. <EnumValue></EnumValue>
  70. <DocShow>PUBLIC</DocShow>
  71. <DocOrder>1</DocOrder>
  72. <Description>Desc1</Description>
  73. </RequestParameter>
  74. <RequestParameter>
  75. <ApiParameterName>RequestKey2</ApiParameterName>
  76. <Location>QUERY</Location>
  77. <ParameterType>Number</ParameterType>
  78. <Required>OPTIONAL</Required>
  79. <DefaultValue></DefaultValue>
  80. <DemoValue>12</DemoValue>
  81. <MaxValue>120</MaxValue>
  82. <MinValue>100</MinValue>
  83. <MaxLength></MaxLength>
  84. <MinLength></MinLength>
  85. <RegularExpression></RegularExpression>
  86. <JsonScheme></JsonScheme>
  87. <EnumValue></EnumValue>
  88. <DocShow>PUBLIC</DocShow>
  89. <DocOrder>2</DocOrder>
  90. <Description>Desc2</Description>
  91. </RequestParameter>
  92. </RequestParameters>
  93. <ServiceParameters>
  94. <ServiceParameter>
  95. <ServiceParameterName>ServiceKey1</ServiceParameterName>
  96. <Location>QUERY</Location>
  97. <ParameterType>String</ParameterType>
  98. </ServiceParameter>
  99. <ServiceParameter>
  100. <ServiceParameterName>ServiceKey2</ServiceParameterName>
  101. <Location>QUERY</Location>
  102. <ParameterType>Number</ParameterType>
  103. </ServiceParameter>
  104. </ServiceParameters>
  105. <ServiceParametersMap>
  106. <ServiceParameterMap>
  107. <ServiceParameterName>RequestKey1</ServiceParameterName>
  108. <RequestParameterName>ServiceKey1</RequestParameterName>
  109. </ServiceParameterMap>
  110. <ServiceParameterMap>
  111. <ServiceParameterName>RequestKey2</ServiceParameterName>
  112. <RequestParameterName>ServiceKey2</RequestParameterName>
  113. </ServiceParameterMap>
  114. </ServiceParametersMap>
  115. <ErrorCodeSamples>
  116. <ErrorCodeSample>
  117. <Code>400</Code>
  118. <Message>Missing the parameter UserId</Message>
  119. <Description>请求缺少参数 UserId</Description>
  120. </ErrorCodeSample>
  121. </ErrorCodeSamples>
  122. <OpenIdConnectConfig>
  123. <publicKey>EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92</publicKey>
  124. <openIdApiType>IDTOKEN</openIdApiType>
  125. <publicKeyId>88483727556929326703309904351185815489</publicKeyId>
  126. </OpenIdConnectConfig>
  127. </DescribeDeployedApiResponse>

JSON格式

  1. {
  2. "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ004",
  3. "RegionId": "cn-qingdao",
  4. "GroupId": "0009db9c828549768a200320714b8930",
  5. "GroupName": "myGroup2",
  6. "StageName": "RELEASE",
  7. "ApiId": "3b81fd160f5645e097cc8855d75a1cf6",
  8. "ApiName": "creatobject",
  9. "Description": "对象创建",
  10. "Visibility": "public",
  11. "AuthType": "APP",
  12. "ResultType": "application/json",
  13. "DeployedTime": "2016-07-23T08:28:48Z",
  14. "RequestConfig": {
  15. "RequestProtocol": "HTTP",
  16. "RequestHttpMethod": "GET",
  17. "RequestPath": "/mypath/creatobject",
  18. "BodyFormat": "FORM",
  19. "PostBodyDescription": "对象"
  20. },
  21. "ServiceConfig": {
  22. "ServiceProtocol": "HTTP/HTTPS",
  23. "ServiceAddress": "http://api.a.com:8080",
  24. "ServiceHttpMethod": "GET",
  25. "ServicePath": "/object/add",
  26. "ServiceTimeout": "2000",
  27. "Mock": "FALSE"
  28. },
  29. "SystemParameters": {
  30. "SystemParameter": [
  31. {
  32. "ParameterName": "CaRequestId",
  33. "ServiceParameterName": "RequestId",
  34. "Location": "HEAD",
  35. "DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6397F",
  36. "Description": "请求编号"
  37. },
  38. {
  39. "ParameterName": "CaAppId",
  40. "ServiceParameterName": "AppId",
  41. "Location": "QUERY",
  42. "DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6398F",
  43. "Description": "请求者应用编号"
  44. }
  45. ]
  46. },
  47. "ConstantParameters": {
  48. "ConstantParameter": {
  49. "ServiceParameterName": "ConstantKey1",
  50. "ConstantValue": "helloworld",
  51. "Location": "QUERY",
  52. "Description": "Desc"
  53. }
  54. },
  55. "RequestParameters": {
  56. "RequestParameter": [
  57. {
  58. "ApiParameterName": "RequestKey1",
  59. "Location": "QUERY",
  60. "ParameterType": "String",
  61. "Required": "REQUIRED",
  62. "DemoValue": "demo1",
  63. "MaxLength": "100",
  64. "MinLength": "3",
  65. "DocShow": "PUBLIC",
  66. "DocOrder": "1",
  67. "Description": "Desc1"
  68. },
  69. {
  70. "ApiParameterName": "RequestKey2",
  71. "Location": "QUERY",
  72. "ParameterType": "Number",
  73. "Required": "OPTIONAL",
  74. "DemoValue": "12",
  75. "MaxValue": "120",
  76. "MinValue": "100",
  77. "DocShow": "PUBLIC",
  78. "DocOrder": "2",
  79. "Description": "Desc2"
  80. }
  81. ]
  82. },
  83. "ServiceParameters": {
  84. "ServiceParameter": [
  85. {
  86. "ServiceParameterName": "ServiceKey1",
  87. "Location": "QUERY",
  88. "ParameterType": "String"
  89. },
  90. {
  91. "ServiceParameterName": "ServiceKey2",
  92. "Location": "QUERY",
  93. "ParameterType": "Number"
  94. }
  95. ]
  96. },
  97. "ServiceParametersMap": {
  98. "ServiceParameterMap": [
  99. {
  100. "ServiceParameterName": "RequestKey1",
  101. "RequestParameterName": "ServiceKey1"
  102. },
  103. {
  104. "ServiceParameterName": "RequestKey2",
  105. "RequestParameterName": "ServiceKey2"
  106. }
  107. ]
  108. },
  109. "ErrorCodeSamples": {
  110. "ErrorCodeSample": [
  111. {
  112. "Code": "400",
  113. "Message": "Missing the parameter UserId",
  114. "Description": "请求缺少参数 UserId"
  115. }
  116. ]
  117. },
  118. "OpenIdConnectConfig": {
  119. "publicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92",
  120. "openIdApiType": "IDTOKEN",
  121. "publicKeyId": "88483727556929326703309904351185815489"
  122. }
  123. }