读取HTTP API信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
 - 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
 - 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
 - 对于不支持资源级授权的操作,用
全部资源表示。 
 - 条件关键字:是指云产品自身定义的条件关键字。
 - 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
 
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
|---|---|---|---|---|
| apig:GetHttpApi | get | *HttpApi acs:apig:{#regionId}:{#accountId}:httpapi/{#HttpApiId} | 
  | 无 | 
请求语法
GET /v1/http-apis/{httpApiId} HTTP/1.1
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| httpApiId | string | 是 | 目标 HTTP API ID。  | api-xxx | 
返回参数
示例
正常返回示例
JSON格式
{
  "requestId": "8FA9BB94-915B-5299-A694-49FCC7F5DD00",
  "message": "success",
  "code": "Ok",
  "data": {
    "httpApiId": "api-xxx",
    "name": "test",
    "basePath": "/v1",
    "description": "测试专用API",
    "versionInfo": {
      "enable": true,
      "scheme": "Query",
      "headerName": "my-version",
      "queryName": "myVersion",
      "version": "v1"
    },
    "ingressInfo": {
      "sourceId": "src-xxx",
      "ingressClass": "mse",
      "watchNamespace": "default",
      "environmentInfo": {
        "environmentId": "env-xxx"
      },
      "k8sClusterInfo": {
        "clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
      },
      "overrideIngressIp": true
    },
    "type": "Rest",
    "resourceGroupId": "rg-xxx",
    "enabelAuth": true,
    "authConfig": {
      "authType": "Jwt",
      "authMode": "NoAuth"
    },
    "gatewayId": "gw-cpv4sqdl****",
    "protocols": [
      "HTTP"
    ],
    "environments": [
      {
        "environmentId": "env-xxx",
        "backendScene": "SingleService",
        "backendType": "Service",
        "serviceConfigs": [
          {
            "gatewayServiceId": "gs-xxx",
            "name": "demo-service",
            "protocol": "HTTP",
            "port": 8080,
            "weight": 100,
            "version": "v1",
            "match": {
              "default": true,
              "conditions": [
                {
                  "type": "Query",
                  "key": "color",
                  "value": "gray",
                  "operator": "equal"
                }
              ]
            },
            "serviceId": "svc-xxx"
          }
        ],
        "customDomains": [
          {
            "domainId": "d-xxx",
            "name": "www.example.com",
            "protocol": "HTTP"
          }
        ],
        "name": "test",
        "alias": "test",
        "gatewayInfo": {
          "gatewayId": "gw-xxx",
          "name": "test"
        },
        "deployStatus": "Deployed",
        "subDomains": [
          {
            "domainId": "d-xxx",
            "name": "www.example.com",
            "protocol": "HTTP",
            "networkType": "Internet"
          }
        ]
      }
    ],
    "aiProtocols": [
      "OpenAI/v1"
    ],
    "deployConfigs": [
      {
        "customDomainIds": [
          "d-xxx"
        ],
        "environmentId": "env-xxx",
        "backendScene": "SingleService",
        "serviceConfigs": [
          {
            "serviceId": "svc-xxx",
            "weight": 100,
            "modelNamePattern": "qwen-*",
            "modelName": "qwen-max"
          }
        ],
        "policyConfigs": [
          {
            "type": "AiFallback",
            "enable": true,
            "aiFallbackConfig": {
              "serviceConfigs": [
                {
                  "serviceId": "",
                  "targetModelName": ""
                }
              ]
            }
          }
        ],
        "autoDeploy": true,
        "gatewayId": "gw-xx",
        "routeBackend": {
          "scene": "Single",
          "services": [
            {
              "serviceId": "service-cq2bmmdlhtgj***",
              "name": "item-service",
              "protocol": "HTTP",
              "port": 0,
              "weight": 49,
              "version": "v1"
            }
          ]
        },
        "customDomainInfos": [
          {
            "domainId": "d-cshee6dlhtgkf4muio3g",
            "name": "hello-server.com",
            "protocol": "HTTP"
          }
        ],
        "subDomains": [
          {
            "domainId": "d-csmn42um1hksudfk9eng",
            "name": "test",
            "protocol": "HTTP",
            "networkType": "Intranet"
          }
        ],
        "gatewayInfo": {
          "gatewayId": "gw-cq7og15lhtgi6qasrj60",
          "name": "apitest-gw",
          "vpcInfo": {
            "vpcId": "vpc-uf664nyle5kh***",
            "name": "商品中心预发环境专有网络"
          },
          "engineVersion": "2.0.7"
        },
        "mock": {
          "enable": false,
          "responseCode": 200,
          "responseContent": "Mock测试"
        },
        "gatewayType": "API"
      }
    ],
    "deployCntMap": {
      "key": {
        "deployedCnt": 3,
        "Cnt": 5
      }
    },
    "modelCategory": ""
  }
}错误码
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|
暂无变更历史
