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.
| Method | Route | Headers |
|---|---|---|
| PUT | {baseurl}/vault/metadata/personal-data-entities/update-delimiters | Authorization: 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.
| Field | Type | Required | Description |
|---|---|---|---|
data | array | Yes | One item per entity; at least one item. |
data[].entity_name | string | Yes | The entity to change, for example, SSN. Each entity can appear only once. |
data[].delimiters | array of strings | Yes | The 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.
| Field | Type | Description |
|---|---|---|
data[].entity_name | string | The entity that was changed. |
data[].delimiters | array of strings | Its stored delimiters, without duplicates. |
success | boolean | true when the delimiters were updated. |
error.message | string | Empty 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:
datais missing, empty or not a list:data must be a non-empty list of {"entity_name", "delimiters"}entity_nameis missing or empty:data[i]: Empty entity_name. Provide a valid entity_namedelimitersis missing:data[i]: Missing key: delimitersdelimitersis 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_changepermission:Permission Denied
An unexpected server error returns HTTP 500 with Error in updating entity delimiters.