Using JMESPath as a PII Allowlist
Yes. While JMESPath cannot use Regex to “partially blur” a specific string (you must use Goja Interceptors for deep masking), it is highly effective as a definitive structural Allowlist. By explicitly mapping only the fields you want to keep, you inherently guarantee that any newly introduced JSON fields sent by the API provider (such as a newly addedssn or credit_score node) are silently discarded at the proxy edge gracefully.
Allowlisting Specific Array Nodes
Assume you are querying a Human Resources system and the endpoint returns highly sensitive PII structurally: The Raw API Output:employees[*].{user_id: id, full_name: name}
The Sanitized Output Delivered to the LLM:
ssn and home_address fields, but we also dynamically renamed id to user_id inside the projection explicitly.