List AI Privacy Presets
Endpoint
GET /apiops/settings/ai-privacy-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": "665f2a1c9b3e4a0012ab34cd",
"projectId": "admin",
"name": "Türkiye TC Kimlik No (TCKN)",
"elementName": "BUILTIN_TR_TCKN",
"patternType": "REGEX",
"regexPattern": "\\b[1-9]\\d{10}\\b",
"operation": "MASK",
"maskMode": "FIXED",
"maskPattern": "***",
"enabled": true,
"builtIn": true
},
{
"id": "665f2a1c9b3e4a0012ab99ff",
"projectId": "admin",
"name": "internal-account-id",
"elementName": null,
"patternType": "REGEX",
"regexPattern": "ACC-[0-9]{8}",
"operation": "MASK",
"maskMode": "KEEP_LAST",
"maskPattern": "*",
"maskVisibleCharCount": 4,
"enabled": true,
"builtIn": false
}
],
"resultCount": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | List of privacy preset objects |
| resultCount | integer | Total number of presets returned |
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 (e.g. Türkiye TC Kimlik No (TCKN)) |
| elementName | string | Stable built-in key for seeded rows (e.g. BUILTIN_TR_TCKN); 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 |
| operation | string | Action applied on match: MASK, DELETE, ENCRYPT, HASH, DETECT |
| 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 |
| 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-privacy-presets/" \
-H "Authorization: Bearer YOUR_TOKEN"
Scoped to a project
curl -X GET \
"https://demo.apinizer.com/apiops/settings/ai-privacy-presets/?projectId=MyProject" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Admin Only:
- Only sysAdmin users (or users with the
ADMINrole) can list AI privacy 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 Türkiye PII catalog and are read-only
- Rows with
- 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:
- Privacy presets carry no secret (
@SecretData) fields, so no values are masked
- Privacy presets carry no secret (
Related Documentation
- Get AI Privacy Preset - Get a single preset by name
- Create AI Privacy Preset - Create or update a preset
- AI Privacy Presets API - Resource overview