Ana içeriğe geç

List AI Prompt-Guard Presets

Endpoint

GET /apiops/settings/ai-prompt-guard-presets/

Authentication

Requires a Personal API Access Token with admin privileges.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

None.

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringNoadminScope 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,
"owaspLlmId": "LLM01",
"mitreAtlasTechnique": "AML.T0054",
"packageVersion": "1"
},
{
"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

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarrayList of prompt-guard preset objects
resultCountintegerTotal number of presets returned

Prompt-Guard Preset Object Fields

FieldTypeDescription
idstringServer-assigned identifier (read-only)
projectIdstringScope the preset belongs to (admin for global)
namestringUnique preset name (e.g. BUILTIN_APG_DAN)
ruleValuestringJava regex pattern matched against prompt content
actionstringAction applied on match: BLOCK, FLAG, MASK
categorystringOptional category label (e.g. jailbreak, injection, system-leak)
descriptionstringOptional description for display
enabledbooleanWhether the preset is active
builtInbooleantrue for Mongock-seeded rows, false for user-created — the field itself is server-owned, but the row is not otherwise read-only
owaspLlmIdstringOptional OWASP GenAI LLM Top 10 category id (e.g. LLM01, LLM08). Read+write — a custom preset may set its own value; built-in rows are stamped by the signature-pack migration.
mitreAtlasTechniquestringOptional MITRE ATLAS technique id (e.g. AML.T0054). Same read+write contract as owaspLlmId.
packageVersionstringRead-only, system-managed: the signature-pack version that stamped this built-in row. null for custom presets and for built-in rows not yet touched by the signature-pack migration.

EnumStatus

  • SUCCESS - Operation successful
  • FAILURE - 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 ADMIN role) can list AI prompt-guard presets
    • A project-scoped AI_DEVELOPMENT token is not sufficient
  • Built-in Presets:
    • Rows with builtIn: true come from the seeded OWASP LLM Top 10 / MITRE ATLAS signature pack. They are editable and deletable like any other row — see Built-in Presets Are Editable.
  • Signature Pack Labels:
    • owaspLlmId/mitreAtlasTechnique are display/reporting metadata only — they never affect runtime matching. Today's built-in pack maps two categories: LLM01 (Prompt Injection) for jailbreak/injection/role-override/safety-bypass patterns, LLM08 (Hidden Context Exposure) for system-prompt-leak patterns.
    • packageVersion is read-only and only ever set by the signature-pack migration — sending it on write has no effect
  • Action Semantics:
    • BLOCK rejects the traffic (403); FLAG lets it pass and records a guardrail hit; MASK redacts the matched region
  • Scope:
    • The default scope is admin/global; pass projectId to list presets for a specific project
  • No Secret Fields:
    • Prompt-guard presets carry no secret (@SecretData) fields, so no values are masked