全部产品
云市场

查询历史版本详情

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

描述

查询指定API的某一次历史发布版本的定义详情,即某一次历史发布时发布的API定义。

  • 此功能面向开放API的用户
  • 网关会记录下每个API每一次发布的时间、定义等等,您可以通过其他的接口获取版本号来指定查询某一次发布的定义详情

请求参数

名称 类型 是否必须 描述
Action String 操作接口名,系统规定参数,取值:DescribeApiHistory
GroupId String 指定的分组编号
ApiId String 指定的API编号
StageName String 环境名称,可选值:
  • RELEASE:线上
  • TEST:测试
HistoryVersion String 指定的版本号(从DescribeHistoryApis接口可以获取到版本号)

返回参数

名称 类型 描述
RequestId String 本次请求编号
RegionId String 所在的region
GroupId String API分组编号
GroupName String API分组名称
StageName String 环境名称,可选值:
  • RELEASE:线上
  • TEST:测试
ApiId String API编号
ApiName String API名称
Description String API描述
HistoryVersion String API定义的版本号
Status String 对应版本的API是否生效,取值为:ENABLE、DISABLE,分别表示有效、无效
Visibility String 可见性,取值为:PUBLIC、PRIVATE,分别表示公开、私有
AuthType String 安全认证方式,取值为:APP、ANONYMOUS、APPOPENID,分别表示阿里云APP、匿名、第三方账号认证OpenID Connect
ResultType String 返回类型
ResultSample String 返回示例
FailResultSample String 后端服务失败返回应答的示例
DeployedTime String 发布时间(格林威治时间)
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=DescribeApiHistory
  2. &ApiId=3b81fd160f5645e097cc8855d75a1cf6
  3. &StageName=RELEASE
  4. &HistoryVersion=20160314220059844
  5. &<公共请求参数>

返回示例

XML格式

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

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