All Products
Search
Document Center

Web Application Firewall:DescribeApisecApiResources

Last Updated:Mar 18, 2026

Queries a list of API security assets that are protected by Web Application Firewall (WAF).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-waf:DescribeApisecApiResources

get

*All Resource

*

  • acs:ResourceGroupId
None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the WAF instance.

Note

Call the DescribeInstance operation to obtain 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 endpoint path used to filter the query results.

/auth/login

MatchedHost

string

No

The domain name or IP address of the API used to filter the query results.

a.aliyun.com

SensitiveType

string

No

The type of sensitive data in the response.

Note

Call the DescribeApisecRules operation to obtain the supported sensitive data types.

1004

ApiStatus

string

No

The lifecycle status of the API. Valid values:

  • NewbornInterface: newly discovered.

  • OfflineInterface: inactive.

  • normal: active.

OfflineInterface

StartTime

string

No

The beginning of the time range to query. Specify a UNIX timestamp in seconds.

1681833600

EndTime

string

No

The end of the time range to query. Specify a UNIX timestamp in seconds.

1683388800

OrderKey

string

No

The field by which to sort the results. Valid values:

  • allCnt: sorts by the total number of requests in the last 30 days.

  • botCnt: sorts by the number of bot requests in the last 30 days.

  • crossBorderCnt: sorts by the number of cross-border requests in the last 30 days.

  • abnormalNum: sorts by the number of threats associated with the API.

  • eventNum: sorts by the number of security events associated with the API.

  • farthestTs: sorts by the time when the API was first discovered.

  • lastestTs: sorts by the time of the most recent access.

allCnt

OrderWay

string

No

The sort order. Valid values:

  • desc: descending order (default).

  • asc: ascending order.

desc

PageNumber

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 10.

10

Follow

integer

No

Indicates whether the API is followed. Valid values:

  • 1: The API is followed.

  • 0: The API is not followed.

0

ApiType

string

No

The type of service that the API serves. Valid values:

  • PublicAPI: public-facing service.

  • ThirdpartAPI: third-party service.

  • InternalAPI: internal service.

innerAPI

ApiTag

string

No

The business purpose of the API.

Note

Call the DescribeApisecRules operation to obtain the supported business purposes.

SendMail

SensitiveLevel

string

No

The sensitivity level of the API. Valid values:

  • L1: High.

  • L2: Medium.

  • L3: Low.

  • N: Non-sensitive.

L3

ApiMethod

string

No

The HTTP request method of the API. Valid values: GET, POST, HEAD, PUT, DELETE, CONNECT, PATCH, and OPTIONS.

POST

ClusterId

string

No

The ID of the Hybrid Cloud WAF cluster.

Note

This parameter is available only for hybrid cloud scenarios. Call the DescribeHybridCloudClusters operation to obtain information about Hybrid Cloud WAF clusters.

740

Note

string

No

The remarks of the API asset used to filter the query results.

loginApi

RequestSensitiveType

string

No

The type of sensitive data in the request.

Note

Call the DescribeApisecRules operation to obtain the supported sensitive data types.

1004,1005

AuthFlag

string

No

Indicates whether the API requires authentication. Valid values:

  • 0: The API requires authentication.

  • 1: The API does not require authentication.

0

RegionId

string

No

The region ID of the WAF instance. Valid values:

  • cn-hangzhou: the Chinese mainland.

  • ap-southeast-1: outside the Chinese mainland.

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

Response elements

Element

Type

Description

Example

object

The response parameters.

TotalCount

integer

The total number of returned entries.

5

RequestId

string

The request ID.

2EFCFE18-78F8-5079-B312-07***48B

Data

array<object>

The list of API assets.

object

The details of the API asset.

EventNum

integer

The number of security events associated with the API.

2

FarthestTs

integer

The time when the API was first discovered. The value is a UNIX timestamp. Unit: seconds.

1683388800

ApiSensitive

string

The sensitive data classification of the API. The value is a JSON string that contains the following fields:

  • request_sensitive_list: the list of sensitive data types in the request.

  • response_sensitive_list: the list of sensitive data types in the response.

  • sensitive_list: the list of sensitive data types.

  • sensitive_level: the sensitivity level.

{ "sensitive_list": ["1003","1005"], "sensitive_level": "L2", "request_sensitive_list": ["1003"], "response_sensitive_list": ["1005"] }

ApiFormat

string

The API endpoint path.

/v1/etl/finddatabyvid

ApiTag

string

The business purpose of the API.

Note

Call the DescribeApisecRules operation to obtain the supported business purposes.

SendMail

CrossBorderCnt

integer

The number of cross-border requests in the last 30 days.

2

AuthFlag

string

Indicates whether the API requires authentication. Valid values:

  • 0: The API requires authentication.

  • 1: The API does not require authentication.

1

AllCnt

integer

The total number of requests in the last 30 days.

1683388800

ApiMethod

string

The HTTP request method of the API. Valid values: GET, POST, HEAD, PUT, DELETE, CONNECT, PATCH, and OPTIONS.

POST

LastestTs

integer

The time of the most recent access to the API. The value is a UNIX timestamp. Unit: seconds.

1683388800

ApiStatus

string

The lifecycle status of the API. Valid values:

  • NewbornInterface: newly discovered.

  • OfflineInterface: inactive.

  • normal: active.

NewbornInterface

ApiSensitiveResponse

string

The types of sensitive data detected in the API response. The value is a JSON array of sensitive data type IDs.

["1002","1005"]

BotCnt

integer

The number of bot requests in the last 30 days.

2

Follow

integer

Indicates whether the API is followed. Valid values:

  • 1: The API is followed.

  • 0: The API is not followed.

1

MatchedHost

string

The domain name or IP address that the API resides on.

a.aliyun.com

ApiInfo

string

The detailed information about the API. The value is a JSON string that contains the following fields:

  • param_num: the number of API parameters.

  • request_method: the request method.

  • protocol: the request protocol.

  • api_url: the request URL.

  • poc_payload: the request.

  • request: the request sample.

  • response: the response sample.

  • param: the request parameters.

Note

This parameter is returned only when you specify the ApiId request parameter.

{ "request": {"referer": "-","content_type": "-","cookie": "-","method": "GET","param": [],"host": "test.cn"}, "protocol": "https", "api_url": "https://test.cn:443/index.php", "param": [], "response": {"param": [], "sensitive_type": {}, "header": {},"body": "", "status": 405 }, "request_method": "GET", "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'", "param_num": 0 }

AbnormalNum

integer

The number of threats associated with the API.

2

ApiType

string

The type of service that the API serves. Valid values:

  • PublicAPI: public-facing service.

  • ThirdpartAPI: third-party service.

  • InternalAPI: internal service.

PublicAPI

Note

string

The remarks of the API asset.

loginApi

ApiId

string

The ID of the API.

197b52abcd81d6a8bd4***e477

Examples deprecated

array

The list of API samples.

string

The sample information. The value is a JSON string that contains the following fields:

  • param_num: the number of API parameters.

  • request_method: the request method.

  • protocol: the request protocol.

  • api_url: the request URL.

  • poc_payload: the request.

  • request: the request sample.

  • response: the response sample.

  • param: the request parameters.

Note

This parameter is returned only when you specify the ApiId request parameter.

{ "request": {"referer": "-","content_type": "-","cookie": "-","method": "GET","param": [],"host": "test.cn"}, "protocol": "https", "api_url": "https://test.cn:443/index.php", "param": [], "response": {"param": [], "sensitive_type": {}, "header": {},"body": "", "status": 405 }, "request_method": "GET", "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'", "param_num": 0 }

ApiSensitiveRequest

string

The types of sensitive data detected in the API request. The value is a JSON array of sensitive data type IDs.

["1002","1005"]

Resources

array

The list of protected objects associated with the API.

string

The name of the protected object associated with the API.

***.top-waf

AccountEventNum

integer

The number of account security events associated with the API.

1

Examples

Success response

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": 1683388800,
      "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": "loginApi",
      "ApiId": "197b52abcd81d6a8bd4***e477",
      "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\"]",
      "Resources": [
        "***.top-waf"
      ],
      "AccountEventNum": 1
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.