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 | No | ID of the specified group. |
ApiId | String | Yes | ID of the specified API. |
StageName | String | Yes | Stage name; values:
|
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:
|
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
https://apigateway.cn-qingdao.aliyuncs.com/?Action=DescribeApiHistory
&ApiId=3b81fd160f5645e097cc8855d75a1cf6
&StageName=RELEASE
&HistoryVersion=20160314220059844
&<Public request parameters>
Response example
XML
format
<DescribeApiHistoryResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ004</RequestId>
<RegionId>cn-qingdao</RegionId>
<GroupId>0009db9c828549768a200320714b8930</GroupId>
<GroupName>myGroup2</GroupName>
<StageName>RELEASE</StageName>
<ApiId>3b81fd160f5645e097cc8855d75a1cf6</ApiId>
<ApiName>creatobject</ApiName>
<Description> Object creation</Description>
<HistoryVersion>20160314220059844</HistoryVersion>
<Status>DISABLE</Status>
<Visibility>public</Visibility>
<AuthType>App</AuthType>
<ResultType>application/json</ResultType>
<ResultSample></ResultSample>
<FailResultSample></FailResultSample>
<DeployedTime>2016-07-23T08:28:48Z</DeployedTime>
<RequestConfig>
<RequestProtocol>HTTP</RequestProtocol>
<RequestHttpMethod>GET</RequestHttpMethod>
<RequestPath>/mypath/creatobject</RequestPath>
<BodyFormat>FORM</BodyFormat>
<PostBodyDescription> Object</PostBodyDescription>
</RequestConfig>
<ServiceConfig>
<ServiceProtocol>HTTP/HTTPS</ServiceProtocol>
<ServiceAddress>http://api.a.com:8080</ServiceAddress>
<ServiceHttpMethod>GET</ServiceHttpMethod>
<ServicePath>/object/add</ServicePath>
<ServiceTimeout>2000</ServiceTimeout>
</ServiceConfig>
<SystemParameters>
<SystemParameter>
<ParameterName>CaRequestId</ParameterName>
<ServiceParameterName>RequestId</ServiceParameterName>
<Location>HEAD</Location>
<DemoValue>0A964636-F7A3-4F1A-92D7-135584A6397F</DemoValue>
<Description> Request ID</Description>
</SystemParameter>
<SystemParameter>
<ParameterName>CaAppId</ParameterName>
<ServiceParameterName>AppId</ServiceParameterName>
<Location>QUERY</Location>
<DemoValue>0A964636-F7A3-4F1A-92D7-135584A6398F</DemoValue>
<Description> Requester application ID</Description>
</SystemParameter>
</SystemParameters>
<ConstantParameters>
<ConstantParameter>
<ServiceParameterName>ConstantKey1</ServiceParameterName>
<ConstantValue>helloworld</ConstantValue>
<Location>QUERY</Location>
<Description>Desc</Description>
</ConstantParameter>
</ConstantParameters>
<RequestParameters>
<RequestParameter>
<ApiParameterName>RequestKey1</ApiParameterName>
<Location>QUERY</Location>
<ParameterType>String</ParameterType>
<Required>REQUIRED</Required>
<DefaultValue></DefaultValue>
<DemoValue>demo1</DemoValue>
<MaxValue></MaxValue>
<MinValue></MinValue>
<MaxLength>100</MaxLength>
<MinLength>3</MinLength>
<RegularExpression></RegularExpression>
<JsonScheme></JsonScheme>
<EnumValue></EnumValue>
<DocShow>PUBLIC</DocShow>
<DocOrder>1</DocOrder>
<Description>Desc1</Description>
</RequestParameter>
<RequestParameter>
<ApiParameterName>RequestKey2</ApiParameterName>
<Location>QUERY</Location>
<ParameterType>Number</ParameterType>
<Required>OPTIONAL</Required>
<DefaultValue></DefaultValue>
<DemoValue>12</DemoValue>
<MaxValue>120</MaxValue>
<MinValue>100</MinValue>
<MaxLength></MaxLength>
<MinLength></MinLength>
<RegularExpression></RegularExpression>
<JsonScheme></JsonScheme>
<EnumValue></EnumValue>
<DocShow>PUBLIC</DocShow>
<DocOrder>2</DocOrder>
<Description>Desc2</Description>
</RequestParameter>
</RequestParameters>
<ErrorCodeSamples>
<ErrorCodeSample>
<Code>400</Code>
<Message>Missing the parameter UserId</Message>
<Description> Request where the parameter UserId is missing</Description>
</ErrorCodeSample>
</ErrorCodeSamples>
<ServiceParameters>
<ServiceParameter>
<ServiceParameterName>ServiceKey1</ServiceParameterName>
<Location>QUERY</Location>
<ParameterType>String</ParameterType>
</ServiceParameter>
<ServiceParameter>
<ServiceParameterName>ServiceKey2</ServiceParameterName>
<Location>QUERY</Location>
<ParameterType>Number</ParameterType>
</ServiceParameter>
</ServiceParameters>
<ServiceParametersMap>
<ServiceParameterMap>
<ServiceParameterName>RequestKey1</ServiceParameterName>
<RequestParameterName>ServiceKey1</RequestParameterName>
</ServiceParameterMap>
<ServiceParameterMap>
<ServiceParameterName>RequestKey2</ServiceParameterName>
<RequestParameterName>ServiceKey2</RequestParameterName>
</ServiceParameterMap>
</ServiceParametersMap>
</DescribeApiHistoryResponse>
JSON
format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ004",
"RegionId": "cn-qingdao",
"GroupId": "0009db9c828549768a200320714b8930",
"GroupName": "myGroup2",
"StageName": "RELEASE",
"ApiId": "3b81fd160f5645e097cc8855d75a1cf6",
"ApiName": "creatobject",
"Description": " Object creation",
"HistoryVersion": "20160314220059844",
"Status": "DISABLE",
"Visibility": "public",
"AuthType": "APP",
"ResultType": "application/json",
"ResultSample": "200",
"FailResultSample": "400",
"DeployedTime": "2016-07-23T08:28:48Z",
"RequestConfig": {
"RequestProtocol": "HTTP",
"RequestHttpMethod": "GET",
"RequestPath": "/mypath/creatobject",
"BodyFormat": "FORM",
" PostBodyDescription" : " Object"
},
"ServiceConfig": {
"ServiceProtocol": "HTTP/HTTPS",
"ServiceAddress": "http://api.a.com:8080",
"ServiceHttpMethod": "GET",
"ServicePath": "/object/add",
"ServiceTimeout": "2000"
},
"SystemParameters": {
"SystemParameter": [
{
"ParameterName": "CaRequestId",
"ServiceParameterName": "RequestId",
"Location": "HEAD",
"DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6397F",
"Description": " Request ID"
},
{
"ParameterName": "CaAppId",
"ServiceParameterName": "AppId",
"Location": "QUERY",
"DemoValue": "0A964636-F7A3-4F1A-92D7-135584A6398F",
"Description": " Requester application ID"
}
]
},
"ConstantParameters": {
"ConstantParameter": {
"ServiceParameterName": "ConstantKey1",
"ConstantValue": "helloworld",
"Location": "QUERY",
"Description": "Desc"
}
},
"RequestParameters": {
"RequestParameter": [
{
"ApiParameterName": "RequestKey1",
"Location": "QUERY",
"ParameterType": "String",
"Required": "REQUIRED",
"DemoValue": "demo1",
"MaxLength": "100",
"MinLength": "3",
"DocShow": "PUBLIC",
"DocOrder": "1",
"Description": "Desc1"
},
{
"ApiParameterName": "RequestKey2",
"Location": "QUERY",
"ParameterType": "Number",
"Required": "OPTIONAL",
"DemoValue": "12",
"MaxValue": "120",
"MinValue": "100",
"DocShow": "PUBLIC",
"DocOrder": "2",
"Description": "Desc2"
}
]
},
"ErrorCodeSamples": {
"ErrorCodeSample": [
{
"Code": "400",
"Message": "Missing the parameter UserId",
"Description": " Request where the parameter UserId is missing"
}
]
},
"ServiceParameters": {
"ServiceParameter": [
{
"ServiceParameterName": "ServiceKey1",
"Location": "QUERY",
"ParameterType": "String"
},
{
"ServiceParameterName": "ServiceKey2",
"Location": "QUERY",
"ParameterType": "Number"
}
]
},
"ServiceParametersMap": {
"ServiceParameterMap": [
{
"ServiceParameterName": "RequestKey1",
"RequestParameterName": "ServiceKey1"
},
{
"ServiceParameterName": "RequestKey2",
"RequestParameterName": "ServiceKey2"
}
]
}
}