Skip to main content

Export alerts

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

FieldRequiredTypeDescription
langNostringLanguage: zh / en, recommended to match the list query
paramsYesstringList query parameters serialized as a JSON string (not a nested object)

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 body

FieldTypeDescription
export_idintegerExport task ID, used to query progress

Response example

{
  "success": true,
  "data": {
    "export_id": 131231
  }
}
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Framework Integration