Update Delimiters

Set the delimiters for one or more entities, in every policy of your namespace.

Endpoint

Set the delimiters for one or more entities in every policy of your namespace.

MethodRouteHeaders
PUT{baseurl}/vault/metadata/personal-data-entities/update-delimitersAuthorization: Bearer <vault-user-api-key>

The API key needs the metadata_change permission. The super-admin token is not accepted.

Request body

Send one item per entity. All items are saved together: if one is invalid, nothing changes.

FieldTypeRequiredDescription
dataarrayYesOne item per entity; at least one item.
data[].entity_namestringYesThe entity to change, for example, SSN. Each entity can appear only once.
data[].delimitersarray of stringsYesThe new delimiters, each a non-empty string. [] removes all delimiters. Duplicates are dropped.

Example request

{
  "data": [
    {"entity_name": "SSN", "delimiters": ["-", " "]},
    {"entity_name": "URL", "delimiters": []}
  ]
}

Response

On success, the call returns the delimiters as stored, in the order you sent them.

FieldTypeDescription
data[].entity_namestringThe entity that was changed.
data[].delimitersarray of stringsIts stored delimiters, without duplicates.
successbooleantrue when the delimiters were updated.
error.messagestringEmpty on success.

Example response

{
  "data": [
    {"entity_name": "SSN", "delimiters": ["-", " "]},
    {"entity_name": "URL", "delimiters": []}
  ],
  "success": true,
  "error": {"message": ""}
}

Delimiter behavior

A delimiter is kept in place when a value is masked. For example, with - set for SSN, 5343-2355 is masked as 7038-2223.

Delimiters belong to an entity's format, so entities sharing a format change together. Setting DATE_OF_BIRTH also sets DEATH_DATE, DISCHARGE_DATE and START_DATE_OF_HOSPITALIZATION.

Errors

Invalid requests return HTTP 200 with success: false and the reason in error.message. Nothing is changed. An error about one item starts with data[i]:, where i is its position, starting at 0.

{
  "data": {},
  "success": false,
  "error": {"message": "data[0]: Entity NOPE not found in namespace."}
}

A request is rejected when:

  • data is missing, empty or not a list: data must be a non-empty list of {"entity_name", "delimiters"}
  • entity_name is missing or empty: data[i]: Empty entity_name. Provide a valid entity_name
  • delimiters is missing: data[i]: Missing key: delimiters
  • delimiters is null, not a list, or contains an empty or non-text value: data[i]: delimiters must be a list of non-empty strings or []
  • The same entity is listed twice: data[i]: entity_name SSN is listed twice
  • The entity does not exist in your namespace: data[i]: Entity NOPE not found in namespace.
  • Two entities that share a format get different delimiters: data[i]: DEATH_DATE uses format Date, which data[j] sets to other delimiters
  • The API key has no metadata_change permission: Permission Denied

An unexpected server error returns HTTP 500 with Error in updating entity delimiters.