All Products
Search
Document Center

API Gateway:DescribeHistoryApis

Last Updated:Feb 09, 2023

Queries the historical versions of an API.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
apigateway:DescribeHistoryApisRead
  • ApiGateway
    acs:apigateway:*:{#accountId}:*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
GroupIdstringYes

The ID of the API group.

0ccb66aadb5345b78a40f57d192d8aa4
StageNamestringNo

The name of the runtime environment. Valid values:

  • RELEASE
  • TEST
RELEASE
ApiIdstringNo

The ID of the API.

a12068f555964ca8a0c9c33288f1e5a7
ApiNamestringNo

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

getPersonInfo
PageSizestringNo

The number of entries to return on each page.

10
PageNumberstringNo

The page number of the current page.

2

Response parameters

ParameterTypeDescriptionExample
object
PageNumberinteger

The page number of the returned page.

1
RequestIdstring

The ID of the request.

6C87A26A-6A18-4B8E-8099-705278381A2C
PageSizeinteger

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

10
TotalCountinteger

The total number of returned entries.

20
ApiHisItemsarray

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

object
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 group to which the API belongs.

myGroup2
GroupIdstring

The ID of the API group.

1084f9034c744137901057206b39d2b6
DeployedTimestring

The publising 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 definition.

20210915101416294
ApiNamestring

The name of the API.

v2_role_assign
RegionIdstring

The ID of the region.

cn-qingdao

Example

Normal return example

JSONFormat

{
  "PageNumber": 1,
  "RequestId": "6C87A26A-6A18-4B8E-8099-705278381A2C",
  "PageSize": 10,
  "TotalCount": 20,
  "ApiHisItems": {
    "ApiHisItem": [
      {
        "Status": "ONLINE",
        "ApiId": "5af418828f0344a3b588c0cc1331a3bc",
        "Description": "Creates an object\n",
        "GroupName": "myGroup2",
        "GroupId": "1084f9034c744137901057206b39d2b6",
        "DeployedTime": "2016-07-20T08:28:48Z",
        "StageName": "RELEASE",
        "HistoryVersion": "20210915101416294",
        "ApiName": "v2_role_assign",
        "RegionId": "cn-qingdao"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the API error center.