Get AI Privacy Preset
Endpoint
GET /apiops/settings/ai-privacy-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 privacy 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": "665f2a1c9b3e4a0012ab34cd",
"projectId": "admin",
"name": "Türkiye TC Kimlik No (TCKN)",
"elementName": "BUILTIN_TR_TCKN",
"patternType": "REGEX",
"regexPattern": null,
"operation": "MASK",
"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 |
Privacy 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 | Display name |
| elementName | string | Stable built-in key for seeded rows; may be null for custom presets |
| patternType | string | Match pattern type: ELEMENT_NAME or REGEX. Seeded PII rules are REGEX too — BUILTIN is no longer used in this catalog. |
| regexPattern | string | Custom regex pattern; present when patternType = REGEX |
| maskMode | string | Mask shape when operation = MASK: FIXED (default), KEEP_FIRST, KEEP_LAST, MASK_FIRST |
| maskPattern | string | Replacement text with FIXED (default ***); mask character with the partial shapes |
| maskVisibleCharCount | integer | Characters kept (or masked, with MASK_FIRST) in the partial shapes; default 4 |
| operation | string | Action applied on match: MASK, DELETE, ENCRYPT, HASH, DETECT |
| 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 privacy preset (name: internal-account-id) was not found!"
}
Other possible messages:
{
"status": "FAILURE",
"resultMessage": "AI privacy 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-privacy-presets/internal-account-id/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Admin Only:
- Only sysAdmin users (or users with the
ADMINrole) can read AI privacy 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:
- Privacy presets carry no secret (
@SecretData) fields, so no values are masked
- Privacy presets carry no secret (
Related Documentation
- List AI Privacy Presets - List all presets
- Update AI Privacy Preset - Update a preset
- AI Privacy Presets API - Resource overview