Skip to main content

List security policies

Query the security policy list. 11 policies in total, fixed and returned in full, no pagination.

Prerequisites

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

Endpoint

GET /policies Query the security policy list. 11 policies in total, fixed and returned in full, no pagination.

Request example

curl -X GET "$BASE_URL/policies" \
  -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
policy_codestringPolicy identifier, see the table below
risk_domainstringPolicy group, see the table below
enabledbooleantrue enabled, false disabled
freebooleanWhether it is a free capability. Free policies remain effective before advanced protection is activated
policy_code values:
policy_coderisk_domainName
content_safetymodel_interactionContent Security
prompt_attackmodel_interactionPrompt Attack
sensitive_data_leakmodel_interactionSensitive Data Leakage
tool_invokeruntime_toolTool Call Security
skill_scanruntime_toolSkills Security Detection
network_protectionruntime_toolNetwork Protection
rag_poisoningknowledge_memoryRAG Data Poisoning
memory_theftknowledge_memoryMemory Theft
identity_credentialidentity_credentialIdentity and Credential Security
baseline_checkconfig_componentBaseline Check (free)
vulnerability_scanconfig_componentVulnerability Scan (free)
risk_domain values: model_interaction, runtime_tool, knowledge_memory, identity_credential, config_component.

Response example

{
  "success": true,
  "data": [
    {"policy_code": "content_safety",      "risk_domain": "model_interaction",   "enabled": false, "free": false},
    {"policy_code": "prompt_attack",       "risk_domain": "model_interaction",   "enabled": true,  "free": false},
    {"policy_code": "sensitive_data_leak", "risk_domain": "model_interaction",   "enabled": true,  "free": false},
    {"policy_code": "tool_invoke",         "risk_domain": "runtime_tool",        "enabled": true,  "free": false},
    {"policy_code": "skill_scan",          "risk_domain": "runtime_tool",        "enabled": true,  "free": false},
    {"policy_code": "network_protection",  "risk_domain": "runtime_tool",        "enabled": false, "free": false},
    {"policy_code": "rag_poisoning",       "risk_domain": "knowledge_memory",    "enabled": true,  "free": false},
    {"policy_code": "memory_theft",        "risk_domain": "knowledge_memory",    "enabled": true,  "free": false},
    {"policy_code": "identity_credential", "risk_domain": "identity_credential", "enabled": true,  "free": false},
    {"policy_code": "baseline_check",      "risk_domain": "config_component",    "enabled": true,  "free": true},
    {"policy_code": "vulnerability_scan",  "risk_domain": "config_component",    "enabled": true,  "free": true}
  ]
}
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Framework Integration