All Products
Search
Document Center

Web Application Firewall:CreateApiExport

Last Updated:Mar 11, 2026

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 Web Application Firewall (WAF) instance.

Note

You can call the DescribeInstance operation to query the ID of the 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 of the export data, such as Asia/Shanghai.

Asia/Shanghai

Type

string

No

The type of the export task. Valid values:

  • apisec_api (default): Exports API asset data.

  • apisec_abnormal: Exports API threat data.

  • apisec_event: Exports API security event data.

apisec_api

Param

string

No

The filter conditions for the export task. The value is a JSON string.

Note

The filter conditions vary based on the export task type specified by 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 is applicable only to hybrid cloud scenarios. You can call the DescribeHybridCloudClusters operation to query hybrid cloud clusters.

993

RegionId

string

No

The region ID of the WAF instance. Valid values:

  • cn-hangzhou: Chinese mainland.

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

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The ID of the resource group.

rg-acfm***q

Export task parameters

API asset task (apisec_api)

Parameters

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

Name Type Example Description
startTime Integer 1741449600 The start time of the query. This value is a UNIX timestamp in seconds.
EndTime Integer 1744097760 The end time of the query. This value is a UNIX timestamp in seconds.
MatchedHost String a.aliyun.com The domain name or IP address of the API.
ApiFormat String /auth/login The API path.
SensitiveType String 1004 The type of sensitive data in the response.
ApiStatus String OfflineInterface The lifecycle status of the API, such as OfflineInterface.
Follow Long 0 Indicates whether the API is followed.
ApiType String innerAPI The service object of the API, such as innerAPI for internal APIs.
ApiTag String SendMail The business purpose of the API.
SensitiveLevel String L3 The sensitivity level of the API.
ApiMethod String POST The request method of the API.
RequestSensitiveType String 1004,1005 The type of sensitive data in the request.
AuthFlag String 0 Indicates whether the API has an authentication field.

API threat task (apisec_abnormal)

Parameters

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

Name Type Example Description
startTime Integer 1741449600 The start time of the query. This value is a UNIX timestamp in seconds.
EndTime Integer 1744097760 The end time of the query. This value is a UNIX timestamp in seconds.
MatchedHost String a.aliyun.com The domain name or IP address of the API.
ApiFormat String /api/users/login The API path.
AbnormalLevel String medium The threat level.
AbnormalTag String LackOfSpeedLimit The threat type.
UserStatus String Confirmed The threat status.
Origin String custom The source of the threat type.
ApiTag String SendMail The business purpose of the API.

API event task (apisec_event)

Parameters

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

Name Type Example Description
StartTs Integer 1741449600 The start time of the query. This value is a UNIX timestamp in seconds.
EndTs Integer 1744097760 The end time of the query. This value is a UNIX timestamp in seconds.
MatchedHost String a.aliyun.com The domain name or IP address of the API.
ApiFormat String /api/users/login The API path.
EventLevel String medium The event level.
EventTag String ObtainSensitiveUnauthorized The event type.
UserStatus String Confirmed The event status.
Origin String custom The source of the event type.
ApiTag String SendMail The 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.