Get AI DLP Preset
Endpoint
GET /apiops/settings/ai-dlp-presets/{presetName}/
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| presetName | string | Yes | Name of the DLP preset (case-insensitive match) |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | string | No | admin | Scope project id. Omit for the admin/global scope. |
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"resultList": [
{
"id": "665f2a1c9b3e4a0012ab5501",
"projectId": "admin",
"name": "BUILTIN_DLP_AWS_ACCESS_KEY",
"ruleValue": "\\bAKIA[0-9A-Z]{16}\\b",
"action": "BLOCK",
"category": "aws",
"description": "AWS access key id (AKIA...)",
"enabled": true,
"builtIn": true
}
],
"resultCount": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | List containing the single matched preset object |
| resultCount | integer | Always 1 on a successful match |
DLP 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 |
| ruleValue | string | Java regex pattern used to detect the secret/credential |
| action | string | Action applied on match: BLOCK, FLAG, or MASK |
| category | string | Optional category label (e.g. aws, openai, github, pem, slack, google, jwt, generic) |
| description | string | Optional description for UI 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 preset name is blank, the preset is not found, or the caller lacks the ADMIN role.
{
"status": "FAILURE",
"resultMessage": "AI DLP preset (name: internal-api-token) was not found!"
}
Other possible messages:
{
"status": "FAILURE",
"resultMessage": "AI DLP preset name can not be empty!"
}
{
"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
curl -X GET \
"https://demo.apinizer.com/apiops/settings/ai-dlp-presets/internal-api-token/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Admin Only:
- Only sysAdmin users (or users with the
ADMINrole) can read AI DLP presets - A project-scoped
AI_DEVELOPMENTtoken is not sufficient
- Only sysAdmin users (or users with the
- Name Matching:
- The preset name is matched case-insensitively within the resolved scope
- Scope:
- Pass
projectIdto look up a preset in a specific project; otherwise the admin/global scope is used
- Pass
- No Secret Fields:
ruleValueis a detection regex pattern, not a credential itself — DLP presets carry no secret (@SecretData) fields, so no values are masked
Related Documentation
- List AI DLP Presets - List all presets
- Update AI DLP Preset - Update a preset
- AI DLP Presets API - Resource overview