Ana içeriğe geç

Get AI Privacy Preset

Endpoint

GET /apiops/settings/ai-privacy-presets/{presetName}/

Authentication

Requires a Personal API Access Token with admin privileges.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
presetNamestringYesName of the privacy preset (case-insensitive match)

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringNoadminScope 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

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarrayList containing the single matched preset object
resultCountintegerAlways 1 on a successful match

Privacy Preset Object Fields

FieldTypeDescription
idstringServer-assigned identifier (read-only)
projectIdstringScope the preset belongs to (admin for global)
namestringDisplay name
elementNamestringStable built-in key for seeded rows; may be null for custom presets
patternTypestringMatch pattern type: ELEMENT_NAME or REGEX. Seeded PII rules are REGEX too — BUILTIN is no longer used in this catalog.
regexPatternstringCustom regex pattern; present when patternType = REGEX
maskModestringMask shape when operation = MASK: FIXED (default), KEEP_FIRST, KEEP_LAST, MASK_FIRST
maskPatternstringReplacement text with FIXED (default ***); mask character with the partial shapes
maskVisibleCharCountintegerCharacters kept (or masked, with MASK_FIRST) in the partial shapes; default 4
operationstringAction applied on match: MASK, DELETE, ENCRYPT, HASH, DETECT
enabledbooleanWhether the preset is active
builtInbooleantrue for Mongock-seeded rows (read-only), false for user-created

EnumStatus

  • SUCCESS - Operation successful
  • FAILURE - 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 ADMIN role) can read AI privacy presets
    • A project-scoped AI_DEVELOPMENT token is not sufficient
  • Name Matching:
    • The preset name is matched case-insensitively within the resolved scope
  • Scope:
    • Pass projectId to look up a preset in a specific project; otherwise the admin/global scope is used
  • No Secret Fields:
    • Privacy presets carry no secret (@SecretData) fields, so no values are masked