All Products
Search
Document Center

Web Application Firewall:CreateApiExport

Last Updated:Jul 06, 2026

Creates an API security data export task.

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:CreateApiExport

create

*All Resource

*

  • acs:ResourceGroupId
None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the WAF instance.

Note

You can call DescribeInstance to obtain the ID of the current WAF instance.

waf-cn-zxu3***

Region

string

No

The language type. Valid values:

  • cn (default): Chinese.

  • en: English.

cn

ZoneId

string

No

The time zone ID.

Asia/Shanghai

Type

string

No

The type of the export task. Valid values:

  • apisec_api (default): API asset task.

  • apisec_abnormal: API risk task.

  • apisec_event: API security event task.

apisec_api

Param

string

No

The extended parameters of the export task. You can filter the exported content by specifying conditions. The value is a JSON string constructed from a series of parameters.

Note

The specific parameters vary depending on the specified export task type (Type). For more information, refer to Export task parameter description.

{ "startTime": 1741449600, "endTime": 1744079820, "sensitiveLevel": "L1" }

ClusterId

string

No

The hybrid cloud cluster ID.

Note

This parameter applies only to hybrid cloud scenarios. You can call DescribeHybridCloudClusters to obtain hybrid cloud cluster information.

993

RegionId

string

No

The region where the WAF instance is deployed. Valid values:

  • cn-hangzhou: the Chinese mainland.

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

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The Alibaba Cloud resource group ID.

rg-acfm***q

Export task parameter description.

API asset task (apisec_api)

Parameter description

For detailed valid values of the parameters, refer to the parameters with the same names in the DescribeApisecApiResources operation.

NameTypeExampleDescription
startTimeInteger1741449600The start time of the query. The value is a Unix timestamp (UTC), in seconds.
EndTimeInteger1744097760The end time of the query. The value is a Unix timestamp (UTC), in seconds.
MatchedHostStringa.aliyun.comThe domain name or IP address to which the API belongs.
ApiFormatString/auth/loginThe API path.
SensitiveTypeString1004The type of sensitive data in the response.
ApiStatusStringOfflineInterfaceThe status of the API.
FollowLong0Specifies whether the API is followed.
ApiTypeStringinnerAPIThe service object.
ApiTagStringSendMailThe business purpose of the API.
SensitiveLevelStringL3The sensitivity level of the API.
ApiMethodStringPOSTThe request method of the API.
RequestSensitiveTypeString1004,1005The type of sensitive information in the request.
AuthFlagString0Specifies whether an authentication field exists.

API risk task (apisec_abnormal)

Parameter description

For detailed valid values of the parameters, refer to the parameters with the same names in the DescribeApisecAbnormals operation.

NameTypeExampleDescription
startTimeInteger1741449600The start time of the query. The value is a Unix timestamp (UTC), in seconds.
EndTimeInteger1744097760The end time of the query. The value is a Unix timestamp (UTC), in seconds.
MatchedHostStringa.aliyun.comThe domain name or IP address to which the API belongs.
ApiFormatString/api/users/loginThe API path.
AbnormalLevelStringmediumThe risk level.
AbnormalTagStringLackOfSpeedLimitThe risk type.
UserStatusStringConfirmedThe risk status.
OriginStringcustomThe source of the risk type.
ApiTagStringSendMailThe business purpose of the API.

API event task (apisec_event)

Parameter description

For detailed valid values of the parameters, refer to the parameters with the same names in the DescribeApisecEvents operation.

NameTypeExampleDescription
StartTsInteger1741449600The start time of the query. The value is a Unix timestamp (UTC), in seconds.
EndTsInteger1744097760The end time of the query. The value is a Unix timestamp (UTC), in seconds.
MatchedHostStringa.aliyun.comThe domain name or IP address to which the API belongs.
ApiFormatString/api/users/loginThe API path.
EventLevelStringmediumThe event level.
EventTagStringObtainSensitiveUnauthorizedThe event type.
UserStatusStringConfirmedThe event status.
OriginStringcustomThe source of the event type.
ApiTagStringSendMailThe business purpose of the API.

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

62382992-F9AA-52B2-9147-66B3B9E51D74

Examples

Success response

JSON format

{
  "RequestId": "62382992-F9AA-52B2-9147-66B3B9E51D74"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.