All Products
Search
Document Center

Web Application Firewall:CreateApiExport

Last Updated:Sep 18, 2025

Creates a task to export API security data.

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

*

None 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 current WAF instance.

waf-cn-zxu3***

Region

string

No

The language of the response. 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 threat task.

  • apisec_event: API security event task.

apisec_api

Param

string

No

The extended parameters for the export task, which are used to filter the exported content. The value is a JSON object that is converted to a string.

Note

The parameters vary based on the specified export task type (Type). For more information, see Export task parameters.

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

ClusterId

string

No

The ID of the hybrid cloud cluster.

Note

This parameter applies only to hybrid cloud scenarios. Call the DescribeHybridCloudClusters operation to obtain information about hybrid cloud clusters.

993

RegionId

string

No

The region 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

Export task parameters

API asset task (apisec_api)

Parameters

For details about the parameter values, see the corresponding parameters in the DescribeApisecApiResources operation.

NameTypeExampleDescription
startTimeInteger1741449600The start time of the query. This value is a UNIX timestamp in seconds.
EndTimeInteger1744097760The end time of the query. This value is a UNIX timestamp in seconds.
MatchedHostStringa.aliyun.comThe domain name or IP address of the API.
ApiFormatString/auth/loginThe API.
SensitiveTypeString1004The type of sensitive data in the response.
ApiStatusStringOfflineInterfaceThe status of the API.
FollowLong0Whether 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.
AuthFlagString0Whether the API has an authentication field.

API threat task (apisec_abnormal)

Parameters

For details about the parameter values, see the corresponding parameters in the DescribeApisecAbnormals operation.

NameTypeExampleDescription
startTimeInteger1741449600The start time of the query. This value is a UNIX timestamp in seconds.
EndTimeInteger1744097760The end time of the query. This value is a UNIX timestamp in seconds.
MatchedHostStringa.aliyun.comThe domain name or IP address of the API.
ApiFormatString/api/users/loginThe API.
AbnormalLevelStringmediumThe threat level.
AbnormalTagStringLackOfSpeedLimitThe threat type.
UserStatusStringConfirmedThe threat status.
OriginStringcustomThe source of the threat type.
ApiTagStringSendMailThe business purpose of the API.

API event task (apisec_event)

Parameters

For details about the parameter values, see the corresponding parameters in the DescribeApisecEvents operation.

NameTypeExampleDescription
StartTsInteger1741449600The start time of the query. This value is a UNIX timestamp in seconds.
EndTsInteger1744097760The end time of the query. This value is a UNIX timestamp in seconds.
MatchedHostStringa.aliyun.comThe domain name or IP address of the API.
ApiFormatString/api/users/loginThe API.
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.

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.