Queries the documentation of an API.
Operation description
-
For API callers, the specified API must be a public or authorized private API that has been published to a runtime environment.
-
When you call this operation as an API caller, the service information, parameter definitions, and other details of the API you specify are returned.
-
When you call this operation as an API provider, the definition of the specified API running in the specified runtime environment is returned. The returned definition takes effect in the runtime environment, and may be different from the definition of the API you modify.
-
Before you call this operation as an API provider, ensure that the API to be queried is a public one or that your application has been authorized to call the API, because authentication on API callers is required.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apigateway:DescribeApiDoc |
get |
*ApiGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GroupId |
string |
No |
The ID of the API group. |
123 |
| StageName |
string |
No |
The environment name. Valid values:
If this parameter is not specified, the default value RELEASE is used. |
RELEASE |
| ApiId |
string |
Yes |
The ID of the API. |
3b81fd160f5645e097cc8855d75a1cf6 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| ApiId |
string |
The ID of the API. |
b24be7e59a104e52bffbf432cc9272af |
| ResultType |
string |
The return value type. |
JSON |
| DisableInternet |
boolean |
|
true |
| ResultSample |
string |
The sample response. |
{\n \"status\": 0,\n \"data\": {\n \"count\": 1,\n \"list\": [\n \"352\"\n ]\n },\n \"message\": \"success\"\n} |
| RegionId |
string |
The region ID of the API group. |
cn-hangzhou |
| ForceNonceCheck |
boolean |
|
true |
| Visibility |
string |
Indicates whether the API is public. Valid values: PUBLIC and PRIVATE. |
PUBLIC |
| FailResultSample |
string |
The sample error response from the backend service. |
{"errorCode":"fail","errorMessage":"param invalid"} |
| AuthType |
string |
The security authentication method. Valid values: APP, ANONYMOUS, and APPOPENID, indicating respectively Alibaba Cloud application authentication, anonymous authentication, and third-party OpenID Connect account authentication. |
APP |
| RequestId |
string |
The ID of the request. |
F253FB5F-9AE1-5DDA-99B5-46BE00A3719E |
| GroupId |
string |
The ID of the API group. |
f51d08c5b7c84342905544ebaec26d35 |
| GroupName |
string |
The name of the API group. |
Member-era transaction service |
| Description |
string |
The API description. |
Lynk & Co digital mallOMS-UAT |
| DeployedTime |
string |
The publishing time. |
2022-07-13T16:00:33Z |
| StageName |
string |
The name of the runtime environment. Valid values:
|
RELEASE |
| ApiName |
string |
The name of the API |
Obtains the QR code URL for a keyword. |
| RequestConfig |
object |
The returned API frontend definition. It is an array consisting of RequestConfig data. |
|
| RequestPath |
string |
The API request path. If the complete API URL is |
/api/billing/test/[type] |
| RequestHttpMethod |
string |
The HTTP method used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS. |
POST |
| BodyFormat |
string |
This parameter takes effect only when the RequestMode parameter is set to MAPPING.******** The server data transmission method used for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data in key-value pairs is transmitted as forms. STREAM indicates that data is transmitted as byte streams. |
STREAM |
| RequestMode |
string |
The request mode. Valid values:
|
MAPPING |
| PostBodyDescription |
string |
The description of the request body. |
fwefwef |
| RequestProtocol |
string |
The protocol type supported by the API. Valid values: HTTP and HTTPS. Separate multiple values with commas (,), such as "HTTP,HTTPS". |
HTTP |
| EscapePathParam |
boolean |
Whether to escape the Path parameter, if true, the [param] on the Path will be treated as a regular character. |
true |
| ErrorCodeSamples |
object |
||
| ErrorCodeSample |
array<object> |
The sample error codes returned by the backend service. |
|
|
object |
The sample error codes returned by the backend service. |
||
| Code |
string |
The returned error code. |
Error |
| Message |
string |
The returned error message. |
error message |
| Description |
string |
The error description. |
Unauthorized |
| RequestParameters |
object |
||
| RequestParameter |
array<object> |
The returned frontend input parameters in the API. It is an array consisting of RequestParameter data. |
|
|
object |
The returned frontend input parameters in the API. It is an array consisting of RequestParameter data. |
||
| JsonScheme |
string |
JSON scheme |
{} |
| MaxValue |
integer |
The maximum value. |
200 |
| ArrayItemsType |
string |
The type of the array element. |
String |
| MinValue |
integer |
The minimum value. |
123456 |
| DocShow |
string |
Indicates whether the document is public. Valid values: PUBLIC and PRIVATE. |
PUBLIC |
| MaxLength |
integer |
The maximum length. |
123456 |
| DefaultValue |
string |
The default value. |
20 |
| ApiParameterName |
string |
The name of the parameter in the API request. |
Length |
| EnumValue |
string |
The hash values that are supported when ParameterType is set to Int, Long, Float, Double, or String. Separate values with commas (,). Examples: 1,2,3,4,9 and A,B,C,E,F. |
boy,girl |
| DemoValue |
string |
The example value. |
20 |
| Required |
string |
Indicates whether the parameter is required. |
OPTIONAL |
| Description |
string |
The parameter description. |
Parameter description |
| ParameterType |
string |
The data type of the parameter. |
String |
| RegularExpression |
string |
The regular expression that is used for parameter validation when ParameterType is set to String. |
xxx |
| MinLength |
integer |
The minimum length. |
2 |
| DocOrder |
integer |
The order in which the parameter is sorted in the document. |
0 |
| Location |
string |
The parameter location. Valid values: BODY, HEAD, QUERY, and PATH. |
HEAD |
Examples
Success response
JSON format
{
"ApiId": "b24be7e59a104e52bffbf432cc9272af",
"ResultType": "JSON",
"DisableInternet": true,
"ResultSample": "{\\n \\\"status\\\": 0,\\n \\\"data\\\": {\\n \\\"count\\\": 1,\\n \\\"list\\\": [\\n \\\"352\\\"\\n ]\\n },\\n \\\"message\\\": \\\"success\\\"\\n}",
"RegionId": "cn-hangzhou",
"ForceNonceCheck": true,
"Visibility": "PUBLIC",
"FailResultSample": "{\"errorCode\":\"fail\",\"errorMessage\":\"param invalid\"}",
"AuthType": "APP",
"RequestId": "F253FB5F-9AE1-5DDA-99B5-46BE00A3719E",
"GroupId": "f51d08c5b7c84342905544ebaec26d35",
"GroupName": "Member-era transaction service",
"Description": "Lynk & Co digital mallOMS-UAT",
"DeployedTime": "2022-07-13T16:00:33Z",
"StageName": "RELEASE",
"ApiName": "Obtains the QR code URL for a keyword.",
"RequestConfig": {
"RequestPath": "/api/billing/test/[type]",
"RequestHttpMethod": "POST",
"BodyFormat": "STREAM",
"RequestMode": "MAPPING",
"PostBodyDescription": "fwefwef",
"RequestProtocol": "HTTP",
"EscapePathParam": true
},
"ErrorCodeSamples": {
"ErrorCodeSample": [
{
"Code": "Error",
"Message": "error message",
"Description": "Unauthorized"
}
]
},
"RequestParameters": {
"RequestParameter": [
{
"JsonScheme": "{}",
"MaxValue": 200,
"ArrayItemsType": "String",
"MinValue": 123456,
"DocShow": "PUBLIC",
"MaxLength": 123456,
"DefaultValue": "20",
"ApiParameterName": "Length",
"EnumValue": "boy,girl",
"DemoValue": "20",
"Required": "OPTIONAL",
"Description": "Parameter description",
"ParameterType": "String",
"RegularExpression": "xxx",
"MinLength": 2,
"DocOrder": 0,
"Location": "HEAD"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.