Queries the details of a specified historical version of a specified API definition.
Operation description
Queries the details of a specified historical version of a specified API definition.
- This API is intended for API providers.
- API Gateway records the time and definition of an API every time the API is published. You can use the version number obtained from other operations to query definition details at a certain publication.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
apigateway:DescribeApiHistory | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
GroupId | string | Yes | The ID of the API group. This ID is generated by the system and globally unique. | 3013a55c0c44483f984d26df27120513 |
ApiId | string | Yes | The ID of the API. | dc6e17ee3120404c839bbcd7622ab6ed |
StageName | string | Yes | The name of the runtime environment. Valid values:
| RELEASE |
HistoryVersion | string | Yes | Specifies the version number that you want to query. | 20211122155403834 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Status": "200",
"ApiId": "bebf996e4b3d445d83078094b72b0d91",
"ResultType": "JSON",
"WebSocketApiType": "COMMON",
"DisableInternet": true,
"ResultBodyModel": "{}",
"ResultSample": "{\\n \\\"status\\\": 0,\\n \\\"data\\\": {\\n \\\"count\\\": 1,\\n \\\"list\\\": [\\n \\\"352\\\"\\n ]\\n },\\n \\\"message\\\": \\\"success\\\"\\n}",
"AppCodeAuthType": "HEADER",
"AllowSignatureMethod": "HmacSHA256",
"RegionId": "cn-hangzhou",
"ForceNonceCheck": true,
"Visibility": "PUBLIC",
"FailResultSample": "{\"errorCode\":\"fail\",\"errorMessage\":\"param invalid\"}",
"AuthType": "APP",
"RequestId": "6C87A26A-6A18-4B8E-8099-705278381A2C",
"Description": "Queries weather based on the region name\n",
"GroupName": "dev_api",
"GroupId": "cfb6ef799bf54fffabb0f02019ad2581",
"DeployedTime": "2021-06-1113:57:38",
"StageName": "RELEASE",
"HistoryVersion": "20211022134156663",
"ApiName": "Backstage_MengMeng Broadcast_Seven Niu Cloud Push Stream Callback_Official\n",
"BackendEnable": true,
"BackendConfig": {
"BackendId": "a0305308908c4740aba9cbfd63ba99b7",
"BackendType": "HTTP",
"BackendName": "zmapi"
},
"RequestConfig": {
"BodyModel": "https://apigateway.aliyun.com/models/3a240a1XXXXXXXXd9ab1bf7e947b4095/9e2df550e85b4XXXXXXXX619eaab",
"RequestPath": "/api/billing/test/[type]",
"RequestHttpMethod": "POST",
"BodyFormat": "STREAM",
"RequestMode": "MAPPING",
"PostBodyDescription": "fwefwef",
"RequestProtocol": "HTTP"
},
"ServiceConfig": {
"VpcId": "vpc-uf6kg9x8sx2tbxxxx",
"MockStatusCode": 200,
"ContentTypeValue": "application/json",
"ServiceProtocol": "HTTP",
"ServicePath": "/object/add",
"ContentTypeCatagory": "CUSTOM",
"ServiceAddress": "http://api.a.com:8080",
"Mock": "TRUE",
"ServiceVpcEnable": "TRUE",
"MockResult": "test result",
"ServiceHttpMethod": "POST",
"ServiceTimeout": 1000,
"MockHeaders": {
"MockHeader": [
{
"HeaderValue": "86400",
"HeaderName": "Content-Type"
}
]
},
"VpcConfig": {
"VpcId": "vpc-2zeafsc3fygk1***",
"VpcScheme": "HTTP",
"InstanceId": "i-bp1h497hkijewv2***",
"Port": 8080,
"Name": "glmall-app-test"
},
"FunctionComputeConfig": {
"FcType": "HttpTrigger",
"RoleArn": "acs:ram::111***:role/aliyunserviceroleforsas",
"Method": "GET",
"FcBaseUrl": "https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/",
"ContentTypeValue": "application/json",
"RegionId": "cn-hangzhou",
"OnlyBusinessPath": false,
"FunctionName": "domain_business_control",
"ContentTypeCatagory": "DEFAULT",
"Path": "/api/offline/cacheData",
"ServiceName": "fcservicename",
"Qualifier": "2"
},
"OssConfig": {
"Key": "ENV",
"Action": "GetObject",
"OssRegionId": "cn-hangzhou",
"BucketName": "phototest02"
},
"EventBridgeConfig": {
"EventBridgeRegionId": "cn-beijing",
"EventBus": "testBus",
"EventSource": "baas_driver",
"RoleArn": "acs:ram::1933122015759***:role/adminoidcaliyun"
}
},
"OpenIdConnectConfig": {
"OpenIdApiType": "IDTOKEN",
"IdTokenParamName": "xxx",
"PublicKeyId": "88483727556929326703309904351185815489",
"PublicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92"
},
"ErrorCodeSamples": {
"ErrorCodeSample": [
{
"Code": "400",
"Message": "MissingParameter",
"Description": "Missing the parameter UserId"
}
]
},
"ResultDescriptions": {
"ResultDescription": [
{
"Type": "String",
"Key": "groupName",
"HasChild": true,
"Description": "for_test1",
"Pid": "pid",
"Mandatory": true,
"Name": "fwqf",
"Id": "id"
}
]
},
"SystemParameters": {
"SystemParameter": [
{
"DemoValue": "192.168.1.1",
"Description": "system parameters description",
"ParameterName": "CaClientIp",
"Location": "HEAD",
"ServiceParameterName": "clientIp"
}
]
},
"CustomSystemParameters": {
"CustomSystemParameter": [
{
"DemoValue": "192.168.1.1",
"Description": "balabala",
"ParameterName": "CaClientIp",
"Location": "HEAD",
"ServiceParameterName": "clientIp"
}
]
},
"ConstantParameters": {
"ConstantParameter": [
{
"Description": "for_test1",
"Location": "HEAD",
"ServiceParameterName": "constance",
"ConstantValue": "constance"
}
]
},
"RequestParameters": {
"RequestParameter": [
{
"JsonScheme": "{}",
"MaxValue": 123456,
"ArrayItemsType": "String",
"MinValue": 123456,
"DocShow": "PUBLIC",
"MaxLength": 123456,
"DefaultValue": "20",
"ApiParameterName": "age",
"EnumValue": "boy,girl",
"DemoValue": "20",
"Required": "OPTIONAL",
"Description": "modidyTest",
"ParameterType": "String",
"RegularExpression": "xxx",
"MinLength": 123456,
"DocOrder": 0,
"Location": "HEAD"
}
]
},
"ServiceParameters": {
"ServiceParameter": [
{
"Location": "HEAD",
"ParameterType": "String",
"ServiceParameterName": "clientIp"
}
]
},
"ServiceParametersMap": {
"ServiceParameterMap": [
{
"RequestParameterName": "sex",
"ServiceParameterName": "sex"
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history