edit-icon download-icon

DescribeApiHistory

Last Updated: Dec 18, 2017

Description

For querying definition details of a certain historical release version of a specified API, that is, the API definition at a certain historical release.

  • This function is intended for API activators.
  • The gateway records the release time and definition of each API each time. You can use the version number obtained from other interfaces to query definition details at a certain release.

Request parameters

Name Type Required? Description
Action String Yes Operation interface, which is a required parameter; value: DescribeApiHistory.
GroupId String Yes ID of the specified group.
ApiId String Yes ID of the specified API.
StageName String Yes Stage name; values:
  • RELEASE: Online
  • TEST: Test
HistoryVersion String Yes The specified version number which can be obtained through the DescribeHistoryApis interface.

Return parameters

Name Type Description
RequestId String ID of the current request.
RegionId String Region where the API is located.
GroupId String API group ID.
GroupName String API group name.
StageName String Stage name; values:
  • RELEASE: Online
  • TEST: Test
ApiId String ID of the API.
ApiName String API name.
Description String API description.
HistoryVersion String Version number of API definition.
Status String Whether the API of the corresponding version is valid; values: ONLINE (valid) and DISABLE (invalid).
Visibility String Visibility; values: PUBLIC and PRIVATE, indicating a public API and a private API respectively.
AuthType String Security authentication method; values: App and ANONYMOUS, indicating Alibaba Cloud App and anonymous type respectively.
ResultType String Type returned.
ResultSample String Response example.
FailResultSample String Sample of the reply failure returned by the backend service.
DeployedTime String Release time (Greenwich mean time).
ErrorCodeSamples ErrorCodeSample Sample of the error code returned by the backend service. For more information, see ApiAttributesType.md#ErrorCodeSamples.
RequestConfig RequestConfig Returned API front-end definition information, in a format consisting of RequestConfig.
ServiceConfig ServiceConfig Returned information on the backend service called through the API, in a format consisting of ServiceConfig.
SystemParameters SystemParameter Returned system parameter items input when a backend service is called through the API, in an array consisting of SystemParameter.
ConstantParameters ConstantParameter Returned system parameter items input when a backend service is called through the API, in an array consisting of ConstantParameter.
RequestParameters RequestParameter Returned front-end input parameter information items in the API, in an array consisting of RequestParameter.
ServiceParameters ServiceParameter Returned system parameter items input when a backend service is called through the API, in an array consisting of ServiceParameter.
ServiceParametersMap ServiceParameterMap Returned mappings between front-end and back-end parameters in the API, in an array consisting of ServiceParameterMap.

Examples

Request example

  1. https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeApiHistory
  2. &GroupId=0009db9c828549768a200320714b8930
  3. &ApiId=3b81fd160f5645e097cc8855d75a1cf6
  4. &StageName=RELEASE
  5. &HistoryVersion=20160314220059844
  6. &<Public request parameters>

Response example

XML format

  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> Object creation</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> Object</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> Request ID</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> Requester application ID</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> Request where the parameter UserId is missing</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. </DescribeApiHistoryResponse>

JSON format

  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": " Object creation",
  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" : " Object"
  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": " Request ID"
  40. },
  41. {
  42. "ParameterName": "CaAppId",
  43. "ServiceParameterName": "AppId",
  44. "Location": "QUERY",
  45. "DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6398F",
  46. "Description": " Requester application ID"
  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": " Request where the parameter UserId is missing"
  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. }
Thank you! We've received your feedback.