Export alerts

Updated at:

Submit an alert export task that exports all records matching the current filter conditions. The returned export_id is used to query export status.

Prerequisites

Configure the endpoint and authentication first. See API overview and authentication.

Endpoint

POST/export_agent_logs

Submit an alert export task that exports all records matching the current filter conditions. The returned export_id is used to query export status.

Request body

langstringOptional

Language: zh / en, recommended to match the list query

paramsstringRequired

List query parameters serialized as a JSON string (not a nested object)

Response fields

export_idinteger

Export task ID, used to query progress

Request example

curl -X POST "$BASE_URL/export_agent_logs" \
  -H "Authorization: Bearer $BAILIAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lang": "zh",
    "params": "{\"CurrentPage\":1,\"PageSize\":20,\"RiskLevel\":\"high\",\"OrderBy\":\"CheckTime\",\"Order\":\"desc\"}"
  }'

BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio/security, and BAILIAN_API_KEY is your Alibaba Cloud Bailian API Key.

Response example

{
  "success": true,
  "data": {
    "export_id": 131231
  }
}