查询指定API的定义。
接口说明
- 此接口面向开放 API 的用户
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
apigateway:DescribeApi | get | *ApiGroup acs:apigateway:{#regionId}:{#accountId}:apigroup/{#GroupId} |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
GroupId | string | 否 | API 所在的分组编号 | 123 |
ApiId | string | 是 | API 的 ID 标识 | 8afff6c8c4c6447abb035812e4d66b65 |
返回参数
示例
正常返回示例
JSON
格式
{
"ApiId": "8afff6c8c4c6447abb035812e4d66b65",
"ResultType": "JSON",
"WebSocketApiType": "COMMON",
"DisableInternet": false,
"ResultBodyModel": "{}",
"ResultSample": "200",
"AppCodeAuthType": "HEADER",
"AllowSignatureMethod": "HmacSHA256",
"RegionId": "cn-qingdao",
"ForceNonceCheck": true,
"Visibility": "PUBLIC",
"FailResultSample": "400",
"AuthType": "APP",
"ModifiedTime": "2016-07-28T13:13:12Z",
"RequestId": "D0FF585F-7966-40CF-BC60-75DB070B23D5<",
"Description": "Api description",
"GroupName": "ApiTest",
"GroupId": "08ae4aa0f95e4321849ee57f4e0b3077",
"Mock": "CLOSED",
"MockResult": "test result",
"CreatedTime": "2016-07-28T09:50:43Z",
"ApiName": "ApiName",
"BackendEnable": true,
"BackendConfig": {
"BackendId": "0038e00c3dca44fcba3a94015d8f5bbf",
"BackendType": "HTTP",
"BackendName": "testoss"
},
"RequestConfig": {
"BodyModel": "https://apigateway.aliyun.com/models/3a240a127dcc4afd9ab1bf7e947b4095/9e2df550e85b4121a79ec33e2619eaab",
"RequestPath": "/api/billing/test/[type]",
"RequestHttpMethod": "POST",
"BodyFormat": "STREAM",
"RequestMode": "MAPPING",
"PostBodyDescription": "fwefwef",
"RequestProtocol": "HTTP",
"EscapePathParam": true
},
"ServiceConfig": {
"AoneAppName": "ib-blank",
"MockStatusCode": 200,
"ContentTypeValue": "application/x-www-form-urlencoded; charset=UTF-8",
"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-Length"
}
]
},
"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://1227****64334133.ap-southeast-1-int***al.fc.aliyuncs.com/201****-15/proxy/test****ice.LATEST/testHttp/",
"ContentTypeValue": "application/x-www-form-urlencoded; charset=UTF-8",
"RegionId": "cn-qingdao",
"OnlyBusinessPath": false,
"FunctionName": "edge_function",
"ContentTypeCatagory": "DEFAULT",
"Path": "/api/offline/cacheData",
"ServiceName": "fcservicename",
"Qualifier": "2"
},
"OssConfig": {
"Key": "/folder/test.json",
"Action": "GetObject",
"OssRegionId": "cn-hangzhou",
"BucketName": "cbg-db"
},
"EventBridgeConfig": {
"EventBus": "testBus",
"EventSource": "baas_driver",
"EventBridgeRegionId": "cn-beijing",
"RoleArn": "acs:ram::1933122015759***:role/adminoidcaliyun"
}
},
"OpenIdConnectConfig": {
"OpenIdApiType": "IDTOKEN",
"IdTokenParamName": "xxx",
"PublicKeyId": "88483727556929326703309904351185815489",
"PublicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92"
},
"ErrorCodeSamples": {
"ErrorCodeSample": [
{
"Code": "400",
"Model": "[\\\"*\\\"]",
"Message": "Missing the parameter UserId",
"Description": "请求缺少参数 UserId"
}
]
},
"SystemParameters": {
"SystemParameter": [
{
"DemoValue": "192.168.1.1",
"Description": "客户端IP",
"ParameterName": "CaClientIp",
"Location": "HEAD",
"ServiceParameterName": "clientIp"
}
]
},
"CustomSystemParameters": {
"CustomSystemParameter": [
{
"DemoValue": "192.168.1.1",
"Description": "客户端IP",
"ParameterName": "CaClientIp",
"Location": "HEAD",
"ServiceParameterName": "clientIp"
}
]
},
"ConstantParameters": {
"ConstantParameter": [
{
"Description": "constance",
"Location": "HEAD",
"ServiceParameterName": "constance",
"ConstantValue": "constance"
}
]
},
"RequestParameters": {
"RequestParameter": [
{
"JsonScheme": "JSON",
"MaxValue": 123456,
"ArrayItemsType": "String",
"MinValue": 123456,
"DocShow": "PUBLIC",
"MaxLength": 123456,
"DefaultValue": "20",
"ApiParameterName": "age",
"EnumValue": "boy,girl",
"DemoValue": "20",
"Required": "OPTIONAL",
"Description": "年龄",
"ParameterType": "String",
"RegularExpression": "xxx",
"MinLength": 123456,
"DocOrder": 0,
"Location": "HEAD"
}
]
},
"ServiceParameters": {
"ServiceParameter": [
{
"Location": "HEAD",
"ParameterType": "String",
"ServiceParameterName": "clientIp"
}
]
},
"ServiceParametersMap": {
"ServiceParameterMap": [
{
"RequestParameterName": "name",
"ServiceParameterName": "name"
}
]
},
"DeployedInfos": {
"DeployedInfo": [
{
"StageName": "RELEASE",
"EffectiveVersion": "xxx",
"DeployedStatus": "DEPLOYED"
}
]
},
"TagList": {
"Tag": [
{
"TagKey": "APP",
"TagValue": "value3"
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-11-21 | OpenAPI 描述信息更新 | 查看变更详情 |
2024-05-27 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-03-14 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-07-11 | OpenAPI 返回结构发生变更 | 查看变更详情 |