Queries API assets in the API security module.
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 |
---|---|---|---|---|
yundun-waf:DescribeApisecApiResources | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the Web Application Firewall (WAF) instance. Note
You can call the DescribeInstance operation to query the ID of the WAF instance.
| waf_v2_public_cn-u***gr20j |
ApiId | string | No | The ID of the API. | 867ade***24ee6e205b8da82b8f84 |
ApiFormat | string | No | The API. | /auth/login |
MatchedHost | string | No | The domain name or IP address of the API. | a.aliyun.com |
SensitiveType | string | No | The sensitive data type in the response. Note
You can call the DescribeApisecRules operation to query the supported sensitive data types.
| 1004 |
ApiStatus | string | No | The API status. Valid values:
| OfflineInterface |
StartTime | string | No | The beginning of the time range to query. This value is a UNIX timestamp in UTC. Unit: seconds. | 1681833600 |
EndTime | string | No | The end of the time range to query. This value is a UNIX timestamp in UTC. Unit: seconds. | 1683388800 |
OrderKey | string | No | The name of the sorting field. Valid values:
| allCnt |
OrderWay | string | No | The sorting method. Valid values:
| desc |
PageNumber | long | No | The page number. Default value: 1. | 1 |
PageSize | long | No | The number of entries per page. Default value: 10. | 10 |
Follow | long | No | Specifies whether to follow the API. Valid values:
| 0 |
ApiType | string | No | The service object. Valid values:
| innerAPI |
ApiTag | string | No | The business purpose of the API. Note
You can call the DescribeApisecRules operation to query the business purpose of the API.
| SendMail |
SensitiveLevel | string | No | The sensitivity level of the API. Valid values:
| L3 |
ApiMethod | string | No | The request method of the API. Valid values:
| POST |
ClusterId | string | No | The ID of the hybrid cloud cluster. Note
For hybrid cloud scenarios only, you can call the DescribeHybridCloudClusters operation to query the hybrid cloud clusters.
| 740 |
Note | string | No | The remarks. | API for logon |
RequestSensitiveType | string | No | The sensitive data type in the request. Note
You can call the DescribeApisecRules operation to query the supported sensitive data types.
| 1004,1005 |
AuthFlag | string | No | Specifies whether authentication is required. Valid values:
| 0 |
RegionId | string | No | The region in which the Web Application Firewall (WAF) instance is deployed. Valid values:
| cn-hangzhou |
ResourceManagerResourceGroupId | string | No | The ID of the Alibaba Cloud resource group. | rg-acfm***q |
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalCount": 5,
"RequestId": "2EFCFE18-78F8-5079-B312-07***48B",
"Data": [
{
"EventNum": 2,
"FarthestTs": 1683388800,
"ApiSensitive": "{\n \"sensitive_list\": [\"1003\",\"1005\"],\n \"sensitive_level\": \"L2\",\n \"request_sensitive_list\": [\"1003\"],\n \"response_sensitive_list\": [\"1005\"]\n}",
"ApiFormat": "/v1/etl/finddatabyvid",
"ApiTag": "SendMail",
"CrossBorderCnt": 2,
"AuthFlag": "1",
"AllCnt": 10,
"ApiMethod": "POST",
"LastestTs": 1683388800,
"ApiStatus": "NewbornInterface",
"ApiSensitiveResponse": "[\"1002\",\"1005\"]",
"BotCnt": 2,
"Follow": 1,
"MatchedHost": "a.aliyun.com",
"ApiInfo": "{\n \"request\": {\"referer\": \"-\",\"content_type\": \"-\",\"cookie\": \"-\",\"method\": \"GET\",\"param\": [],\"host\": \"test.cn\"},\n \"protocol\": \"https\",\n \"api_url\": \"https://test.cn:443/index.php\",\n \"param\": [],\n \"response\": {\"param\": [], \"sensitive_type\": {}, \"header\": {},\"body\": \"\", \"status\": 405 },\n \"request_method\": \"GET\",\n \"poc_payload\": \"curl -X GET -H 'Accept: */*' -H 'Connection: keep-alive' -H 'User-agent: python-requests/2.32.3' -H 'X-forwarded-for: {{IPv6 Address}}' -H 'Host: test.cn' -H 'Accept-encoding: gzip, deflate' 'https://test.cn:443/index.php'\",\n \"param_num\": 0\n}",
"AbnormalNum": 2,
"ApiType": "PublicAPI",
"Note": "Password changed\n",
"ApiId": "867ade***24ee6e205b8da82b8f84\n",
"Examples": [
"{\n \"request\": {\"referer\": \"-\",\"content_type\": \"-\",\"cookie\": \"-\",\"method\": \"GET\",\"param\": [],\"host\": \"test.cn\"},\n \"protocol\": \"https\",\n \"api_url\": \"https://test.cn:443/index.php\",\n \"param\": [],\n \"response\": {\"param\": [], \"sensitive_type\": {}, \"header\": {},\"body\": \"\", \"status\": 405 },\n \"request_method\": \"GET\",\n \"poc_payload\": \"curl -X GET -H 'Accept: */*' -H 'Connection: keep-alive' -H 'User-agent: python-requests/2.32.3' -H 'X-forwarded-for: {{IPv6 Address}}' -H 'Host: test.cn' -H 'Accept-encoding: gzip, deflate' 'https://test.cn:443/index.php'\",\n \"param_num\": 0\n}"
],
"ApiSensitiveRequest": "[\"1002\",\"1005\"]"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.