讀取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",
"protocols": [
"HTTP"
],
"basePath": "/v1",
"description": "測試專用API",
"versionInfo": {
"enable": true,
"scheme": "Query",
"headerName": "my-version",
"queryName": "myVersion",
"version": "v1"
},
"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"
}
]
}
],
"ingressInfo": {
"sourceId": "src-xxx",
"ingressClass": "mse",
"watchNamespace": "default",
"environmentInfo": {
"environmentId": "env-xxx"
},
"k8sClusterInfo": {
"clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
},
"overrideIngressIp": true
},
"type": "Rest",
"resourceGroupId": "rg-xxx",
"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": {
"serviceIds": [
"svc-xxx"
]
}
}
],
"autoDeploy": true
}
]
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內容概要 | 操作 |
---|
暫無變更歷史