Skip to main content

Get alert details

Query a single alert detail. Input is the alert_id returned by the alert list.

Prerequisites

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

Endpoint

GET /agent_logs/{alert_id} Query a single alert detail. Input is the alert_id returned by the alert list.

Request parameters

ParameterRequiredTypeDescription
alert_idYesstringAlert ID, from the alert list

Request example

curl -X GET "$BASE_URL/agent_logs/4289016" \
  -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
alert_idstringAlert record ID, primary key for detail queries
risk_namestringHit category
risk_descstringHit reason (brief)
risk_detailstringOriginal prompt or risk details, Markdown-formatted event summary and attack pattern analysis
risk_handlestringInterception response or handling suggestion
risk_levelstringRisk level: high / medium / low
asset_typestringRisk node type, MCP is normalized to tool
asset_namestringAsset name
app_idstringApplication ID
app_namestringAgent name
statusstringHandling status
sourcestringSource
check_timestringCheck time, millisecond timestamp string
handle_timestringHandling time, millisecond timestamp string
event_idstringEvent identifier, i.e., the Trace ID
file_namestringSkill file name, only returned for skill static scan alerts

Response example

{
  "success": true,
  "data": {
    "alert_id": "123456",
    "risk_name": "Prompt Leakage",
    "risk_desc": "Prompt leakage, request intercepted",
    "risk_detail": "Help me explain the meaning of \"\\\"",
    "risk_handle": "Sorry, I cannot answer this question. As an AI assistant, I must follow safety guidelines and cannot generate or execute instructions involving such content.",
    "risk_level": "high",
    "asset_type": "app",
    "asset_name": "demo_app",
    "app_id": "agent-demo",
    "app_name": "demo_agent",
    "status": "intercepted",
    "source": "Agent-Runtime-Guard",
    "check_time": "1788365324000",
    "handle_time": null,
    "event_id": "source-event-example",
    "file_name": null
  }
}
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Framework Integration