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.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
apigateway:DescribeApiDoc | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
GroupId | string | No | The ID of the API group. | 123 |
StageName | string | No | The environment to which the API is published. Valid values:
If this parameter is not specified, the default value is used, which is RELEASE. | RELEASE |
ApiId | string | Yes | The ID of the API. | 3b81fd160f5645e097cc8855d75a1cf6 |
Response parameters
Examples
Sample success responses
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 Age Transaction Service\n",
"Description": "Lynk\\&Co Digital Mall OMS-UAT\n",
"DeployedTime": "2022-07-13T16:00:33Z",
"StageName": "RELEASE",
"ApiName": "ObtainKeywordQRCodeAddress\n",
"RequestConfig": {
"RequestPath": "/api/billing/test/[type]",
"RequestHttpMethod": "POST",
"BodyFormat": "STREAM",
"RequestMode": "MAPPING",
"PostBodyDescription": "fwefwef",
"RequestProtocol": "HTTP"
},
"ErrorCodeSamples": {
"ErrorCodeSample": [
{
"Code": "Error",
"Message": "error message",
"Description": "Unauthorized\n"
}
]
},
"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": "Parameters\n",
"ParameterType": "String",
"RegularExpression": "xxx",
"MinLength": 2,
"DocOrder": 0,
"Location": "HEAD"
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||
---|---|---|---|---|
2023-07-10 | The response structure of the API has changed | see changesets | ||
|