List AI Prompt-Guard Presets
Endpoint
GET /apiops/settings/ai-prompt-guard-presets/
Authentication
Requires a Personal API Access Token with admin privileges.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
None.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | string | No | admin | Scope project id. Omit for the admin/global scope, where built-in and admin-owned presets live. |
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"resultList": [
{
"id": "665f3b2d8c4f5b0013cd45ef",
"projectId": "admin",
"name": "BUILTIN_APG_DAN",
"ruleValue": "(?i)ignore (all|previous) instructions",
"action": "BLOCK",
"category": "jailbreak",
"description": "Classic DAN / instruction-override jailbreak attempt",
"enabled": true,
"builtIn": true
},
{
"id": "665f3b2d8c4f5b0013cd77aa",
"projectId": "admin",
"name": "block-internal-hostnames",
"ruleValue": "(?i)internal\\.corp\\.local",
"action": "FLAG",
"category": "system-leak",
"description": "Flags mentions of internal hostnames",
"enabled": true,
"builtIn": false
}
],
"resultCount": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | List of prompt-guard preset objects |
| resultCount | integer | Total number of presets returned |
Prompt-Guard Preset Object Fields
| Field | Type | Description |
|---|---|---|
| id | string | Server-assigned identifier (read-only) |
| projectId | string | Scope the preset belongs to (admin for global) |
| name | string | Unique preset name (e.g. BUILTIN_APG_DAN) |
| ruleValue | string | Java regex pattern matched against prompt content |
| action | string | Action applied on match: BLOCK, FLAG, MASK |
| category | string | Optional category label (e.g. jailbreak, injection, system-leak) |
| description | string | Optional description for display |
| enabled | boolean | Whether the preset is active |
| builtIn | boolean | true for Mongock-seeded rows (read-only), false for user-created |
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
Returned when the caller is authenticated but lacks the ADMIN role.
{
"status": "FAILURE",
"resultMessage": "Unauthorized! Only users with ADMIN role can manage AI presets!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
Default (admin/global scope)
curl -X GET \
"https://demo.apinizer.com/apiops/settings/ai-prompt-guard-presets/" \
-H "Authorization: Bearer YOUR_TOKEN"
Scoped to a project
curl -X GET \
"https://demo.apinizer.com/apiops/settings/ai-prompt-guard-presets/?projectId=MyProject" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Admin Only:
- Only sysAdmin users (or users with the
ADMINrole) can list AI prompt-guard presets - A project-scoped
AI_DEVELOPMENTtoken is not sufficient
- Only sysAdmin users (or users with the
- Built-in Presets:
- Rows with
builtIn: truecome from the seeded OWASP LLM01 catalog and are read-only
- Rows with
- Action Semantics:
BLOCKrejects the traffic (403);FLAGlets it pass and records a guardrail hit;MASKredacts the matched region
- Scope:
- The default scope is admin/global; pass
projectIdto list presets for a specific project
- The default scope is admin/global; pass
- No Secret Fields:
- Prompt-guard presets carry no secret (
@SecretData) fields, so no values are masked
- Prompt-guard presets carry no secret (
Related Documentation
- Get AI Prompt-Guard Preset - Get a single preset by name
- Create AI Prompt-Guard Preset - Create or update a preset
- AI Prompt-Guard Presets API - Resource overview