edit-icon download-icon

Query the historical version list of an API

Last Updated: May 17, 2017

Description

For querying the list of historical versions of a specified API.

  • This function is intended for API activators. Only released APIs have the historical version records.
  • You can call this interface to obtain the API historical version numbers which can be used for calling other interfaces.

Request parameters

Name Type Required? Description
Action String Yes Operation interface, which is a required parameter; value: DescribeApiHistories.
GroupId String Yes ID of the specified group.
ApiId String No ID of the specified API.
ApiName String No API name (fuzzy matching).
StageName String No Stage name; values:
  • RELEASE: Online
  • TEST: Test
PageSize Integer No Number of lines per page set at paging query; maximum value: 100; default value: 10.
PageNumber Integer No The page number specified for query; default value: 1; the starting number: 1.

Return parameters

Name Type Description
RequestId String ID of the current request.
TotalCount Integer Total number of returned results.
PageNumber Integer Page number specified to be returned.
PageSize Integer Specified total number of results returned per page.
ApiHisItems ApiHisItem Returned API information, in an array consisting of ApiHisItem.

Examples

Request example

  1. https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeApiHistories
  2. &ApiName=weather
  3. &pageSize=15
  4. &pageNumber=3
  5. &<Public request parameters>

Response example

XML format

  1. <DescribeApiHistoriesResponse>
  2. <ApiHisItems>
  3. <ApiHisItem>
  4. <RegionId>cn-qingdao</RegionId>
  5. <GroupId>63be9002440b4778a61122f14c2b2bbb</GroupId>
  6. <GroupName>myGroup3</GroupName>
  7. <ApiId>c076144d7878437b8f82fb85890ce6a0</ApiId>
  8. <ApiName> Obtain the object list</ApiName>
  9. <StageName>release</StageName>
  10. <HistoryVersion>20160705104552292</HistoryVersion>
  11. <Status>DISABLE</Status>
  12. <Description> Display the object list on multiple pages</Description>
  13. <DeployedTime>2016-07-23T08:28:48Z</DeployedTime>
  14. </ApiHisItem>
  15. <ApiHisItem>
  16. <RegionId>cn-qingdao</RegionId>
  17. <GroupId>1084f9034c744137901057206b39d2b6</GroupId>
  18. <GroupName>myGroup2</GroupName>
  19. <ApiId>5af418828f0344a3b588c0cc1331a3bc</ApiId>
  20. <ApiName> Create object</ApiName>
  21. <StageName>release</StageName>
  22. <HistoryVersion>20160705104552393</HistoryVersion>
  23. <Status>DISABLE</Status>
  24. <Description> Create object interface</Description>
  25. <DeployedTime>2016-07-20T08:28:48Z</DeployedTime>
  26. </ApiHisItem>
  27. </ApiHisItems>
  28. <PageNumber>3</PageNumber>
  29. <PageSize>15</PageSize>
  30. <TotalCount>32</TotalCount>
  31. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ003</RequestId>
  32. </DescribeApiHistoriesResponse>

JSON format

  1. {
  2. "ApiHisItems": {
  3. "ApiHisItem": [
  4. {
  5. "RegionId": "cn-qingdao",
  6. "GroupId": "63be9002440b4778a61122f14c2b2bbb",
  7. "GroupName": "myGroup3",
  8. "ApiId": "c076144d7878437b8f82fb85890ce6a0",
  9. "ApiName": " Obtain the object list",
  10. "StageName": "release",
  11. "HistoryVersion": "20160705104552292",
  12. "Status": "DISABLE",
  13. "Description": " Display the object list on multiple pages",
  14. "DeployedTime": "2016-07-23T08:28:48Z"
  15. },
  16. {
  17. "RegionId": "cn-qingdao",
  18. "GroupId": "1084f9034c744137901057206b39d2b6",
  19. "GroupName": "myGroup2",
  20. "ApiId": "5af418828f0344a3b588c0cc1331a3bc",
  21. "ApiName": " Create object",
  22. "StageName": "release",
  23. "HistoryVersion": "20160705104552393",
  24. "Status": "DISABLE",
  25. "Description": " Create object interface",
  26. "DeployedTime": "2016-07-20T08:28:48Z"
  27. }
  28. ]
  29. },
  30. "PageNumber": 3,
  31. "PageSize": 15,
  32. "TotalCount": 32,
  33. "RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BZ003"
  34. }
Thank you! We've received your feedback.