Opami Protect
v0.1.0Hide private and sensitive data in text and local text files with Opami Protect pseudonymisation.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
protect_text
Hides private and sensitive data (names, emails, phone numbers and similar) in a text by replacing them with placeholders such as [PERSON_1]. The text is sent to the Opami Protect API, which keeps nothing. This is pseudonymisation, and it can be reversed: the server keeps the placeholder map in its own memory for this session and returns a short map_id, and restore_text with that map_id puts the real values back. The real values stay in the server and out of the result unless return_map is true. output: "replace" swaps in fake data instead; it works in 7 languages, costs twice as much and cann…
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to protect. Must not be empty. |
exclude | array | Categories, sub-categories or types to leave as they are (for example "contact.email"). At most 50. |
output | string | "placeholders" (default) or "replace" (fake data in 7 languages, costs 2x, cannot be restored). |
return_map | boolean | Also return the placeholder map with the real values. Default false. |
protect_file
Hides private and sensitive data (names, emails, phone numbers and similar) in a local UTF-8 text file without putting the file's content in your context. Pass the file's path inside the workspace folders your client shares. The server reads the file itself and sends its text to the Opami Protect API, which keeps nothing. It returns the text with placeholders such as [PERSON_1] and a short map_id. This is pseudonymisation, and it can be reversed: the server keeps the placeholder map in its own memory for this session, and restore_text with that map_id puts the real values back. The real values…
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of a UTF-8 text file inside the client's workspace folders. Absolute, or relative when the client shares exactly one folder. |
exclude | array | Categories, sub-categories or types to leave as they are (for example "contact.email"). At most 50. |
restore_text
Puts the real details back into a text that holds placeholders, using the placeholder map the server kept for a map_id from protect_text or protect_file. It runs locally: no network call and no API key. The result contains the real private and sensitive data, so call it only when you need them. Placeholders that are not in this map (for example from another map_id, or edited) stay as written. The result gives restored_count and not_found_count, so check not_found_count before you use the text. The maps live only in this server's memory: after a restart the map is gone, so protect the text agai…
| Parameter | Type | Description |
|---|---|---|
map_id * | string | The map_id returned by protect_text or protect_file. |
text * | string | Text that holds placeholders such as [PERSON_1]. |
detect_pii
Finds private and sensitive data (names, emails, phone numbers and similar) in a text and returns each one with its type and position, without changing the text. The text is sent to the Opami Protect API, which keeps nothing. Each detection includes the real value, so the result shows the private data to you; use protect_text instead to avoid seeing it. start and end are UTF-16 code units, as JavaScript string indices, so text.slice(start, end) gives the value. exclude takes at most 50 entries.
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to scan. |
exclude | array | Categories, sub-categories or types to leave out of the results. At most 50 entries. |