查询指定API的某一次历史发布版本的定义详情,即某一次历史发布时发布的API定义。
接口说明
查询指定 API 的某一次历史发布版本的定义详情,即某一次历史发布时发布的 API 定义。
- 此功能面向开放 API 的用户。
- 网关会记录下每个 API 每一次发布的时间、定义等等,您可以通过其他的接口获取版本号来指定查询某一次发布的定义详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用全部资源表示。
 
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
|---|---|---|---|---|
| apigateway:DescribeApiHistory | get | *ApiGroup acs:apigateway:{#regionId}:{#accountId}:apigroup/{#GroupId} | 
 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| GroupId | string | 是 | API 分组 ID,系统生成,全局唯一。 | 3013a55c0c44483f984d26df27120513 | 
| ApiId | string | 是 | 指定的 API 编号。 | dc6e17ee3120404c839bbcd7622ab6ed | 
| StageName | string | 是 | 环境名称,取值为: 
 | RELEASE | 
| HistoryVersion | string | 是 | 指定要查询的历史版本号。 | 20211122155403834 | 
返回参数
示例
正常返回示例
JSON格式
{
  "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": "根据地区名称查询天气情况",
  "GroupName": "dev_api",
  "GroupId": "cfb6ef799bf54fffabb0f02019ad2581",
  "DeployedTime": "2021-06-1113:57:38",
  "StageName": "RELEASE",
  "HistoryVersion": 20211022134156664,
  "ApiName": "测试API",
  "BackendEnable": true,
  "BackendConfig": {
    "BackendId": "a0305308908c4740aba9cbfd63ba99b7",
    "BackendType": "HTTP",
    "BackendName": "zmapi"
  },
  "RequestConfig": {
    "BodyModel": "https://apigateway.aliyun.com/models/340a127dcc4afd9ab1bf7e947b4095/9e2df550e85b412179ec33e2619eaab",
    "RequestPath": "/api/billing/test/[type]",
    "RequestHttpMethod": "POST",
    "BodyFormat": "STREAM",
    "RequestMode": "MAPPING",
    "PostBodyDescription": "fwefwef",
    "RequestProtocol": "HTTP",
    "EscapePathParam": false
  },
  "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": "/folder/test.json",
      "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": 8.848372755692933e+37,
    "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"
      }
    ]
  }
}错误码
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|---|---|
| 2024-11-21 | OpenAPI 描述信息更新 | 查看变更详情 | 
| 2024-05-27 | OpenAPI 返回结构发生变更 | 查看变更详情 | 
