Process a $sensitive payload and check its input and output
const url = 'https://app.prefactorai.com/api/v1/utils/process_sensitive_payload';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":{"$sensitive":"string","labels":["personal_identifiers"],"value":"a@example.com"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.prefactorai.com/api/v1/utils/process_sensitive_payload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": { "$sensitive": "string", "labels": [ "personal_identifiers" ], "value": "a@example.com" } }'Runs the payload through the same $sensitive marker processing Prefactor uses when a span is ingested and read. Reports whether the markers are well-formed, whether the unwrapped payload matches the schema when one is sent, and the wire form a span read would return. Does not create a span.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”JSON object in wire form; values marked with $sensitive are parsed as markers
object
Example
{ "email": { "$sensitive": "string", "labels": [ "personal_identifiers" ], "value": "a@example.com" }}Responses
Section titled “Responses”Success
object
True when every $sensitive marker in the payload is well-formed under the rules used at span ingest
Problems found. Fields start with payload for marker and payload problems, and with schema for schema document problems. Empty when every check passes
A problem at a field path found by a schema, payload or marker check
object
Field path with the problem
Description of the problem
Example
{ "markers_valid": true, "output": { "email": { "$sensitive": "string", "labels": [ "personal_identifiers" ], "value": "a@example.com" } }, "payload_valid": true, "problems": [], "sensitive_encoding": true, "status": "success"}default
Section titled “default”Error
object
object
object
object
Milliseconds until the client may retry.
object
A valid knowledgebase document revision ID
Example
{ "code": "bad_request", "status": "error"}