All Products
Search
Document Center

:DescribeApisecApiResources

Last Updated:Nov 15, 2024

Queries API assets in the API security module.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-waf:DescribeApisecApiResourcesget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

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
ApiIdstringNo

The ID of the API.

867ade***24ee6e205b8da82b8f84
ApiFormatstringNo

The API.

/auth/login
MatchedHoststringNo

The domain name or IP address of the API.

a.aliyun.com
SensitiveTypestringNo

The sensitive data type in the response.

Note You can call the DescribeApisecRules operation to query the supported sensitive data types.
1004
ApiStatusstringNo

The API status. Valid values:

  • NewbornInterface: The API is newly added.
  • OfflineInterface: The API is inactive.
  • normal: The API is normal.
OfflineInterface
StartTimestringNo

The beginning of the time range to query. This value is a UNIX timestamp in UTC. Unit: seconds.

1681833600
EndTimestringNo

The end of the time range to query. This value is a UNIX timestamp in UTC. Unit: seconds.

1683388800
OrderKeystringNo

The name of the sorting field. Valid values:

  • allCnt: the total number of calls to the API in the previous 30 days
  • botCnt: the number of bot-initiated requests in the previous 30 days
  • crossBorderCnt: the number of cross-border requests in the previous 30 days
  • abnormalNum: the number of API-related risks
  • eventNum: the number of API-related security events
  • farthestTs: the time when the API was first detected
  • lastestTs: the time of the most recent access to the API
allCnt
OrderWaystringNo

The sorting method. Valid values:

  • desc (default): descending order
  • asc: ascending order
desc
PageNumberlongNo

The page number. Default value: 1.

1
PageSizelongNo

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

10
FollowlongNo

Specifies whether to follow the API. Valid values:

  • 1: follows the API.
  • 0: does not follow the API.
0
ApiTypestringNo

The service object. Valid values:

  • PublicAPI: public services
  • ThirdpartAPI: cooperation with third-party partners
  • InternalAPI: internal office
innerAPI
ApiTagstringNo

The business purpose of the API.

Note You can call the DescribeApisecRules operation to query the business purpose of the API.
SendMail
SensitiveLevelstringNo

The sensitivity level of the API. Valid values:

  • L1: high sensitivity
  • L2: moderate sensitivity
  • L3: low sensitivity
  • N: non-sensitivity
L3
ApiMethodstringNo

The request method of the API. Valid values:

  • GET
  • POST
  • HEAD
  • PUT
  • DELETE
  • CONNECT
  • PATCH
  • OPTIONS
POST
ClusterIdstringNo

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
NotestringNo

The remarks.

API for logon
RequestSensitiveTypestringNo

The sensitive data type in the request.

Note You can call the DescribeApisecRules operation to query the supported sensitive data types.
1004,1005
AuthFlagstringNo

Specifies whether authentication is required. Valid values:

  • 0: Authentication is required.
  • 1: Authentication is not required.
0
RegionIdstringNo

The region in which the Web Application Firewall (WAF) instance is deployed. Valid values:

  • cn-hangzhou: Chinese mainland
  • ap-southeast-1: outside the Chinese mainland
cn-hangzhou
ResourceManagerResourceGroupIdstringNo

The ID of the Alibaba Cloud resource group.

rg-acfm***q

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountlong

The total number of entries returned.

5
RequestIdstring

The request ID.

2EFCFE18-78F8-5079-B312-07***48B
Dataarray<object>

The API assets.

resourceobject

The asset details.

EventNumlong

The number of API-related security events.

2
FarthestTslong

The time when the API asset was first detected. This value is a UNIX timestamp in UTC. Unit: seconds.

1683388800
ApiSensitivestring

The API-related sensitive information. The value of this parameter is a JSON string that contains multiple parameters. The value includes the following parameters:

  • request_sensitive_list: the sensitive data type in the request
  • response_sensitive_list: the sensitive data type in the response
  • sensitive_list: sensitive data types
  • sensitive_level: sensitivity level
{ "sensitive_list": ["1003","1005"], "sensitive_level": "L2", "request_sensitive_list": ["1003"], "response_sensitive_list": ["1005"] }
ApiFormatstring

The API.

/v1/etl/finddatabyvid
ApiTagstring

The business purpose of the API.

Note You can call the DescribeApisecRules operation to query the business purpose of the API.
SendMail
CrossBorderCntlong

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

2
AuthFlagstring

Indicates whether authentication is required. Valid values:

  • 0: Authentication is required.
  • 1: Authentication is not required.
1
AllCntlong

The total number of calls to this API in the previous 30 days.

10
ApiMethodstring

The request method of the API. Valid values:

  • GET
  • POST
  • HEAD
  • PUT
  • DELETE
  • CONNECT
  • PATCH
  • OPTIONS
POST
LastestTslong

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

1683388800
ApiStatusstring

The API status. Valid values:

  • NewbornInterface: The API is newly added.
  • OfflineInterface: The API is inactive.
  • normal: The API is normal.
NewbornInterface
ApiSensitiveResponsestring

The sensitive data type in the response.

["1002","1005"]
BotCntlong

The number of bot-initiated requests in the previous 30 days.

2
Followinteger

Specifies whether to follow the API. Valid values:

  • 1: follows the API.
  • 0: does not follow the API.
1
MatchedHoststring

The domain name or IP address of the API.

a.aliyun.com
ApiInfostring

The API-related information. The value of this parameter is a JSON string that contains multiple parameters. The value includes the following parameters:

  • 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 sample request
  • response: the sample response
  • param: the request parameters
{ "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 }
AbnormalNumlong

The number of API-related risks.

2
ApiTypestring

The service object. Valid values:

  • PublicAPI: public services
  • ThirdpartAPI: cooperation with third-party partners
  • InternalAPI: internal office
PublicAPI
Notestring

The remarks.

Password changed
ApiIdstring

The ID of the API.

867ade***24ee6e205b8da82b8f84
Examplesarray

The sample APIs.

examplesstring

The sample information. The value of this parameter is a JSON string that contains multiple parameters. The value includes the following parameters:

  • 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 sample request
  • response: the sample response
  • param: the request parameters
{ "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 }
ApiSensitiveRequeststring

The sensitive data type in the request.

["1002","1005"]

Examples

Sample success responses

JSONformat

{
  "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.