查询指定API在指定环境中正在运行的定义,是真正在指定环境中生效的定义,可能跟正在编辑中的定义不同。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
apigateway:DescribeDeployedApi |
get |
*ApiGroup
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| GroupId |
string |
否 |
API 分组 ID,系统生成,全局唯一 |
81750604ccff48c48f34d6c0165e09db |
| ApiId |
string |
是 |
指定 API 编号 |
ab7c95a01a7e42f28718f34497bbf47c |
| StageName |
string |
是 |
指定要操作 API 的环境。
|
RELEASE |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| ApiId |
string |
API 编号 |
4eed13a57d4e42fbb51316be8a5329ff |
| ResultType |
string |
后端服务返回应答的格式,目前可以设置为:JSON、TEXT、BINARY、XML、HTML。默认为 JSON。 |
HTML |
| DisableInternet |
boolean |
说明
修改 API 时,不设置则不修改原来的取值。 |
true |
| ResultBodyModel |
string |
api 的返回结果 |
{} |
| ResultSample |
string |
后端服务返回应答的示例 |
{code: 200, message:'success', data: ''} |
| AllowSignatureMethod |
string |
API 的客户端请求签名方法,可选值:
|
HmacSHA256 |
| RegionId |
string |
分组所在区域 |
cn-beijing |
| ForceNonceCheck |
boolean |
|
true |
| Visibility |
string |
API 是否公开,可以取值:
|
PUBLIC |
| FailResultSample |
string |
后端服务失败返回应答的示例 |
{"errorCode":"fail","errorMessage":"param invalid"} |
| AuthType |
string |
API 安全认证类型,目前可以取值:
|
APP |
| RequestId |
string |
本次请求的 ID。 |
EF924FE4-2EDD-4CD3-89EC-34E4708574E7 |
| Description |
string |
描述信息 |
Api description |
| GroupName |
string |
API 分组名称 |
Weather |
| GroupId |
string |
分组编号 |
bc77f5b49c974437a9912ea3755cd834 |
| DeployedTime |
string |
部署时间,格式为 yyyy-mm-ddhh:mm:ss |
2022-07-25T17:47:51Z |
| StageName |
string |
指定要操作 API 的环境。
|
RELEASE |
| ApiName |
string |
API 名称 |
weather |
| RequestConfig |
object |
Consumer 向网关发送 API 请求的相关配置项。 更多信息,请参见 RequestConfig 。 |
|
| BodyModel |
string |
body 模型 |
https://apigateway.aliyun.com/models/3a240a127dcc4afd9ab1bf7e947b4095/9e2df550e85b4121a79ec33e2619eaab |
| RequestPath |
string |
API path,比如 API 的完全地址为 |
/api/billing/test/[type] |
| RequestHttpMethod |
string |
HTTP Method,取值为:GET、POST、DELETE、PUT、HEADER、TRACE、PATCH、CONNECT、OPTIONS。 |
POST |
| BodyFormat |
string |
当 RequestMode 值为 MAPPING 时有效。 POST/PUT 请求时,表示数据以何种方式传递给服务器,取值为:FORM、STREAM,分别表示表单形式(k-v 对应)、字节流形式。 |
STREAM |
| RequestMode |
string |
入参请求的模式,取值为:
|
MAPPING |
| PostBodyDescription |
string |
请求 body 描述 |
fwefwef |
| RequestProtocol |
string |
API 支持的协议类型,可以多选,多选情况下以英文逗号隔开,如:"HTTP,HTTPS",取值为:HTTP、HTTPS、WebSocket |
HTTP |
| ServiceConfig |
object |
网关向后端服务发送 API 请求的相关配置项。 更多信息,请参见 ServiceConfig 。 |
|
| VpcId |
string |
专有网络 ID。 |
vpc-uf6kg9x8sx2tbxxxx |
| MockStatusCode |
integer |
Mock 返回状态码 |
200 |
| ServicePath |
string |
调用后端服务 path,比如后端服务完全地址为 |
/object/add |
| Mock |
string |
是否采取 Mock 模式,目前可以取值:
|
TRUE |
| ServiceAddress |
string |
调用后端服务地址,比如后端服务完全地址为 |
http://api.a.com:8080 |
| ServiceVpcEnable |
string |
是否启用 VPC 通道,目前可以取值:
|
TRUE |
| MockResult |
string |
如果启用 Mock 模式,返回的结果 |
test result |
| ServiceHttpMethod |
string |
调用后端服务 HTTP 协议时的 Method,取值为:GET、POST、DELETE、PUT、HEADER、TRACE、PATCH、CONNECT、OPTIONS。 |
POST |
| ServiceProtocol |
string |
后端服务协议类型,目前只支持 HTTP/HTTPS/FunctionCompute |
HTTP |
| ServiceTimeout |
integer |
后端服务超时时间,单位:毫秒 |
1000 |
| MockHeaders |
object |
||
| MockHeader |
array<object> |
模拟 Headers |
|
|
object |
|||
| HeaderValue |
string |
HTTP 头参数值 |
86400 |
| HeaderName |
string |
HTTP 头参数名 |
Content-Type |
| VpcConfig |
object |
VPC 通道相关配置项 |
|
| VpcId |
string |
专用网络 ID |
vpc-2zeafsc3fygk1*** |
| InstanceId |
string |
专用网络中的实例 ID(Ecs/负载均衡) |
i-bp1h497hkijewv2*** |
| Port |
integer |
实例对应的端口号 |
8080 |
| Name |
string |
VPC 授权名称 |
glmall-app-test |
| FunctionComputeConfig |
object |
后端为函数计算时的后端配置项 |
|
| FcType |
string |
函数计算服务类型 |
HttpTrigger |
| RoleArn |
string |
Ram 授权给 API 网关访问函数计算的 arn |
acs:ram::111***:role/aliyunserviceroleforsas |
| Method |
string |
请求方法 |
GET |
| FcBaseUrl |
string |
函数计算服务根路径 |
https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/ |
| ContentTypeValue |
string |
调用后端服务 HTTP 服务,ContentTypeCatagory 的值为 DEFAULT 或者 CUSTOM 时,ContentType 头的取值。 |
application/x-www-form-urlencoded; charset=UTF-8 |
| RegionId |
string |
所在的 region |
cn-beijing |
| OnlyBusinessPath |
boolean |
后端只接收业务 path |
false |
| FunctionName |
string |
函数计算定义的 FunctionName |
domain_business_control |
| ContentTypeCatagory |
string |
调用后端服务 HTTP 服务时,ContentType 头的取值策略:
|
DEFAULT |
| Path |
string |
API 请求路径 |
/api/offline/cacheData |
| ServiceName |
string |
函数计算定义的 ServiceName |
fcservicename |
| Qualifier |
string |
函数别名 |
2 |
| OpenIdConnectConfig |
object |
第三方账号认证 OpenID Connect 相关配置项 |
|
| OpenIdApiType |
string |
OpenID Connect 模式,目前可以取值:
|
IDTOKEN |
| IdTokenParamName |
string |
Token 对应的参数名称 |
xxx |
| PublicKeyId |
string |
公钥 ID |
88483727556929326703309904351185815489 |
| PublicKey |
string |
api 公钥 |
EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92 |
| ErrorCodeSamples |
object |
||
| ErrorCodeSample |
array<object> |
后端服务返回的错误码示例。 更多信息,请参见 ErrorCodeSample 。 |
|
|
object |
|||
| Code |
string |
错误码 |
Error |
| Message |
string |
错误信息。 |
error message |
| Description |
string |
描述信息 |
错误描述 |
| ResultDescriptions |
object |
||
| ResultDescription |
array<object> |
api 的返回说明 |
|
|
object |
api 的返回说明 |
||
| Type |
string |
类型 |
string |
| Key |
string |
返回参数 |
key |
| HasChild |
boolean |
是否含有子节点 |
false |
| Description |
string |
描述信息 |
result description |
| Pid |
string |
父节点 ID |
11 |
| Mandatory |
boolean |
是否必填。 |
true |
| Name |
string |
返回参数名称 |
name |
| Id |
string |
节点 ID |
1 |
| SystemParameters |
object |
||
| SystemParameter |
array<object> |
系统参数列表。 |
|
|
object |
|||
| DemoValue |
string |
示例 |
192.168.1.1 |
| Description |
string |
描述信息 |
QueryParamDTO |
| ParameterName |
string |
系统参数名,取值为:CaClientIp、CaDomain、CaRequestHandleTime、CaAppId、CaRequestId、CaHttpSchema、CaProxy。 |
CaClientIp |
| Location |
string |
参数位置,取值为:BODY、HEAD、QUERY、PATH |
HEAD |
| ServiceParameterName |
string |
对应后端参数名称 |
clientIp |
| CustomSystemParameters |
object |
||
| CustomSystemParameter |
array<object> |
自定义系统参数列表 |
|
|
object |
|||
| DemoValue |
string |
示例值 |
192.168.1.1 |
| Description |
string |
描述信息 |
123 |
| ParameterName |
string |
自定义系统参数名 |
appid |
| Location |
string |
参数位置,取值为:BODY、HEAD、QUERY、PATH |
HEAD |
| ServiceParameterName |
string |
对应后端参数名称 |
clientIp |
| ConstantParameters |
object |
||
| ConstantParameter |
array<object> |
常量参数列表 |
|
|
object |
|||
| Description |
string |
描述信息 |
123 |
| Location |
string |
参数位置,取值为:BODY、HEAD、QUERY、PATH |
HEAD |
| ServiceParameterName |
string |
后端参数名称 |
constance |
| ConstantValue |
string |
常量值 |
constance |
| RequestParameters |
object |
||
| RequestParameter |
array<object> |
Consumer 向网关发送 API 请求的参数描述。 更多信息,请参见 RequestParameter 。 |
|
|
object |
|||
| JsonScheme |
string |
JSON scheme |
{} |
| MaxValue |
integer |
当 ParameterType=Int、Long、Float、Double,参数的最大值限定 |
123456 |
| ArrayItemsType |
string |
数组元素的类型 |
String |
| MinValue |
integer |
当 ParameterType=Int、Long、Float、Double,参数的最小值限定 |
123456 |
| DocShow |
string |
文档可见,取值为:PUBLIC、PRIVATE |
PUBLIC |
| MaxLength |
integer |
当 ParameterType=String,参数的最大长度限定 |
123456 |
| DefaultValue |
string |
默认值 |
20 |
| ApiParameterName |
string |
API 参数名称 |
age |
| EnumValue |
string |
当 ParameterType=Int、Long、Float、Double 或 String,允许输入的散列值,不同的值用英文的逗号分隔,形如:1,2,3,4,9 或 A,B,C,E,F。 |
boy,girl |
| DemoValue |
string |
示例值 |
20 |
| Required |
string |
是否必填,取值为:REQUIRED、OPTIONAL,分别表示必填、不必填 |
OPTIONAL |
| Description |
string |
参数描述 |
parameter description |
| ParameterType |
string |
参数类型,取值为:String、Int、Long、Float、Double、Boolean,分别表示字符、整型、长整型、单精度浮点型、双精度浮点型、布尔。 |
String |
| RegularExpression |
string |
当 ParameterType=String,参数验证(正则表达式) |
xxx |
| MinLength |
integer |
当 ParameterType=String,参数的最小长度限定 |
123456 |
| DocOrder |
integer |
文档中顺序 |
0 |
| Location |
string |
参数位置,取值为:BODY、HEAD、QUERY、PATH |
HEAD |
| ServiceParameters |
object |
||
| ServiceParameter |
array<object> |
网关向后端服务发送 API 请求的参数描述。 更多信息,请参见 ServiceParameter 。 |
|
|
object |
|||
| Location |
string |
参数位置,取值为:BODY、HEAD、QUERY、PATH |
HEAD |
| ParameterType |
string |
后端参数数据类型,取值为:STRING、NUMBER、BOOLEAN,分别表示字符、数值、布尔。 |
String |
| ServiceParameterName |
string |
后端参数名称 |
clientIp |
| ServiceParametersMap |
object |
||
| ServiceParameterMap |
array<object> |
Consumer 向网关发送请求的参数和网关向后端服务发送的请求的参数的映射关系。 更多信息,请参见 ServiceParameterMap 。 |
|
|
object |
|||
| RequestParameterName |
string |
前端入参名称 |
sex |
| ServiceParameterName |
string |
后端参数名称 |
sex |
示例
正常返回示例
JSON格式
{
"ApiId": "4eed13a57d4e42fbb51316be8a5329ff",
"ResultType": "HTML",
"DisableInternet": true,
"ResultBodyModel": "{}",
"ResultSample": "{code: 200, message:'success', data: ''}",
"AllowSignatureMethod": "HmacSHA256",
"RegionId": "cn-beijing",
"ForceNonceCheck": true,
"Visibility": "PUBLIC",
"FailResultSample": "{\"errorCode\":\"fail\",\"errorMessage\":\"param invalid\"}",
"AuthType": "APP",
"RequestId": "EF924FE4-2EDD-4CD3-89EC-34E4708574E7",
"Description": "Api description",
"GroupName": "Weather",
"GroupId": "bc77f5b49c974437a9912ea3755cd834",
"DeployedTime": "2022-07-25T17:47:51Z",
"StageName": "RELEASE",
"ApiName": "weather",
"RequestConfig": {
"BodyModel": "https://apigateway.aliyun.com/models/3a240a127dcc4afd9ab1bf7e947b4095/9e2df550e85b4121a79ec33e2619eaab",
"RequestPath": "/api/billing/test/[type]",
"RequestHttpMethod": "POST",
"BodyFormat": "STREAM",
"RequestMode": "MAPPING",
"PostBodyDescription": "fwefwef",
"RequestProtocol": "HTTP"
},
"ServiceConfig": {
"VpcId": "vpc-uf6kg9x8sx2tbxxxx",
"MockStatusCode": 200,
"ServicePath": "/object/add",
"Mock": "TRUE",
"ServiceAddress": "http://api.a.com:8080",
"ServiceVpcEnable": "TRUE",
"MockResult": "test result",
"ServiceHttpMethod": "POST",
"ServiceProtocol": "HTTP",
"ServiceTimeout": 1000,
"MockHeaders": {
"MockHeader": [
{
"HeaderValue": "86400",
"HeaderName": "Content-Type"
}
]
},
"VpcConfig": {
"VpcId": "vpc-2zeafsc3fygk1***",
"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/x-www-form-urlencoded; charset=UTF-8\n",
"RegionId": "cn-beijing",
"OnlyBusinessPath": false,
"FunctionName": "domain_business_control",
"ContentTypeCatagory": "DEFAULT",
"Path": "/api/offline/cacheData",
"ServiceName": "fcservicename",
"Qualifier": "2"
}
},
"OpenIdConnectConfig": {
"OpenIdApiType": "IDTOKEN",
"IdTokenParamName": "xxx",
"PublicKeyId": "88483727556929326703309904351185815489",
"PublicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92"
},
"ErrorCodeSamples": {
"ErrorCodeSample": [
{
"Code": "Error",
"Message": "error message",
"Description": "错误描述"
}
]
},
"ResultDescriptions": {
"ResultDescription": [
{
"Type": "string",
"Key": "key",
"HasChild": false,
"Description": "result description",
"Pid": "11",
"Mandatory": true,
"Name": "name",
"Id": "1"
}
]
},
"SystemParameters": {
"SystemParameter": [
{
"DemoValue": "192.168.1.1",
"Description": "QueryParamDTO",
"ParameterName": "CaClientIp",
"Location": "HEAD",
"ServiceParameterName": "clientIp"
}
]
},
"CustomSystemParameters": {
"CustomSystemParameter": [
{
"DemoValue": "192.168.1.1",
"Description": "123",
"ParameterName": "appid",
"Location": "HEAD",
"ServiceParameterName": "clientIp"
}
]
},
"ConstantParameters": {
"ConstantParameter": [
{
"Description": "123",
"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": "parameter description",
"ParameterType": "String",
"RegularExpression": "xxx",
"MinLength": 123456,
"DocOrder": 0,
"Location": "HEAD"
}
]
},
"ServiceParameters": {
"ServiceParameter": [
{
"Location": "HEAD",
"ParameterType": "String",
"ServiceParameterName": "clientIp"
}
]
},
"ServiceParametersMap": {
"ServiceParameterMap": [
{
"RequestParameterName": "sex",
"ServiceParameterName": "sex"
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。