All Products
Search
Document Center

API Gateway:DescribeApiHistories

Last Updated:Apr 01, 2024

Queries the historical versions of a specified API.

Operation description

  • This operation is intended for API providers. Only APIs that have been published have historical version records.
  • This operation allows you to obtain the historical versions of an API. This operation is always called by other operations.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apigateway:DescribeApiHistoriesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GroupIdstringYes

The ID of the API group.

1084f9034c744137901057206b39d2b6
StageNamestringNo

The name of the runtime environment. Valid values:

  • RELEASE
  • TEST
RELEASE
ApiIdstringNo

The ID of the API.

c076144d7878437b8f82fb85890ce6a0
ApiNamestringNo

The name of the API. The name is used for fuzzy match.

weather
PageSizestringNo

The number of entries to return on each page. Maximum value: 100. Default value: 10.

10
PageNumberstringNo

The number of the page to return. Pages start from page 1. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
PageNumberinteger

The page number of the returned page.

3
RequestIdstring

The ID of the request.

CEF72CEB-54B6-4AE8-B225-F876FF7BZ003
PageSizeinteger

The number of entries returned per page.

15
TotalCountinteger

The total number of returned entries.

32
ApiHisItemsobject []

The returned API information. It is an array consisting of ApiHisItem data.

Statusstring

Indicates whether an API version is effective. Valid values: ONLINE and OFFLINE.

ONLINE
ApiIdstring

The ID of the API.

5af418828f0344a3b588c0cc1331a3bc
Descriptionstring

The description of the API.

Creates an object
GroupNamestring

The name of the API group.

myGroup2
GroupIdstring

The ID of the API group.

1084f9034c744137901057206b39d2b6
DeployedTimestring

The publishing time (UTC) of the API.

2016-07-20T08:28:48Z
StageNamestring

The name of the runtime environment. Valid values:

  • RELEASE
  • TEST
RELEASE
HistoryVersionstring

The historical version of the API.

20160705104552393
ApiNamestring

The name of the API.

CreateObject
RegionIdstring

The region in which the API is located.

cn-qingdao

Examples

Sample success responses

JSONformat

{
  "PageNumber": 3,
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ003",
  "PageSize": 15,
  "TotalCount": 32,
  "ApiHisItems": {
    "ApiHisItem": [
      {
        "Status": "ONLINE",
        "ApiId": "5af418828f0344a3b588c0cc1331a3bc",
        "Description": "Creates an object\n",
        "GroupName": "myGroup2",
        "GroupId": "1084f9034c744137901057206b39d2b6",
        "DeployedTime": "2016-07-20T08:28:48Z",
        "StageName": "RELEASE",
        "HistoryVersion": "20160705104552393",
        "ApiName": "CreateObject\n",
        "RegionId": "cn-qingdao"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history