Skip to main content

List alerts

Query the security alert list with cursor-based pagination. Supports filters such as risk level, handling status, and asset type.

Prerequisites

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

Endpoint

GET /agent_logs Query the security alert list with cursor-based pagination. Supports filters such as risk level, handling status, and asset type.

Request parameters

ParameterRequiredTypeDescription
current_pageNointegerCurrent page number, default 1
page_sizeNointegerPage size, default 20
risk_levelNostringRisk level filter: high / medium / low
statusNostringHandling status filter
status_listNoarrayHandling status batch filter (multiple values)
risk_nameNostringRisk name filter
app_nameNostringApplication name filter
asset_typeNostringAsset type filter: agent / tool / skill / knowledge_base / memory / channel
vendorNostringVendor filter
order_byNostringSort field, default check_time
orderNostringSort direction: asc / desc, default desc
langNostringLanguage: zh / en

Request example

curl -X GET "$BASE_URL/agent_logs?current_page=1&page_size=20&risk_level=high&order_by=check_time&order=desc&lang=zh" \
  -H "Authorization: Bearer $BAILIAN_API_KEY"
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
statsobjectStatistics: total count, and high / medium / low grouped by level
dataarrayAlert list, item fields in the table below
next_pageintegerCursor page number, null on the last page
List item fields:
FieldTypeDescription
alert_idstringAlert ID, numeric, used for detail queries
risk_levelstringRisk level: high / medium / low
risk_namestringRisk name
risk_descstringRisk description
asset_typestringAsset type
asset_namestringAsset name
app_idstringApplication ID
app_namestringApplication name
agent_namestringAgent name
statusstringHandling status: unhandled / handling / intercepted, etc.
sourcestringSource: aiguard / Agent-Runtime-Guard / cspm, etc.
check_timestringCheck time, millisecond timestamp string
handle_timestringHandling time, millisecond timestamp string

Response example

{
  "success": true,
  "data": {
    "stats": {"total": 15, "high": 3, "medium": 7, "low": 5},
    "data": [
      {
        "alert_id": "4289016",
        "risk_level": "high",
        "risk_name": "Prompt Injection Attack",
        "risk_desc": "Prompt leakage, request intercepted",
        "asset_type": "agent",
        "asset_name": "demo_agent",
        "app_id": "app-1001",
        "app_name": "demo_application",
        "agent_name": "demo_agent",
        "status": "intercepted",
        "source": "Agent-Runtime-Guard",
        "check_time": "1788365324000",
        "handle_time": null
      }
    ],
    "next_page": null
  }
}
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Framework Integration