Skip to content

Discard sensitive sidecar for an agent span

POST
/api/v1/agent_spans/{agent_span_id}/discard_sensitive
curl --request POST \
--url https://app.prefactorai.com/api/v1/agent_spans/013xrzp12g3nqk8ns6jadrqmpgrjkeny/discard_sensitive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data null
agent_span_id
required
AgentSpan_Id

A valid agent span ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
One of:

Optional idempotency key for ensuring request idempotency

string

Success

Media typeapplication/json
object
details
required
AgentSpan_Details
object
account_id
required
Account_Id

A valid account ID

string
agent_id
required
Agent_Id

A valid agent ID

string
agent_instance_id
required
AgentInstance_Id

A valid agent instance ID

string
data_risk
required
One of:
DataRisk
object
action_profile
required
ActionProfile
object
create_data
required

Creates data

string
Allowed values: unknown allowed disallowed
destroy_data
required

Destroys data

string
Allowed values: unknown allowed disallowed
external_communication
required

Sends external communications

string
Allowed values: unknown allowed disallowed
financial_transactions
required

Performs financial transactions

string
Allowed values: unknown allowed disallowed
read_data
required

Reads data

string
Allowed values: unknown allowed disallowed
update_data
required

Updates data

string
Allowed values: unknown allowed disallowed
params_data_categories
required
DataCategories
object
authentication_and_secrets
required

Authentication and secrets present

string
Allowed values: unknown included excluded
behavioural_and_inferred
required

Behavioural and inferred data present

string
Allowed values: unknown included excluded
classification
required

Classification level

string
Allowed values: unknown public internal confidential restricted secret
contact_information
required

Contact information present

string
Allowed values: unknown included excluded
criminal_justice
required

Criminal justice data present

string
Allowed values: unknown included excluded
financial_information
required

Financial information present

string
Allowed values: unknown included excluded
gdpr_biometric_for_identification
required

GDPR: biometric data for identification

string
Allowed values: unknown included excluded
gdpr_genetic_data
required

GDPR: genetic data

string
Allowed values: unknown included excluded
gdpr_political_opinions
required

GDPR: political opinions

string
Allowed values: unknown included excluded
gdpr_racial_or_ethnic_origin
required

GDPR: racial or ethnic origin

string
Allowed values: unknown included excluded
gdpr_religious_or_philosophical_beliefs
required

GDPR: religious or philosophical beliefs

string
Allowed values: unknown included excluded
gdpr_sex_life_or_sexual_orientation
required

GDPR: sex life or sexual orientation

string
Allowed values: unknown included excluded
gdpr_trade_union_membership
required

GDPR: trade union membership

string
Allowed values: unknown included excluded
health_and_medical
required

Health and medical data present

string
Allowed values: unknown included excluded
location_and_tracking
required

Location and tracking data present

string
Allowed values: unknown included excluded
minors_data
required

Minors data present

string
Allowed values: unknown included excluded
organisational_confidential
required

Organisational confidential data present

string
Allowed values: unknown included excluded
personal_identifiers
required

Personal identifiers present

string
Allowed values: unknown included excluded
result_data_categories
required
DataCategories
object
authentication_and_secrets
required

Authentication and secrets present

string
Allowed values: unknown included excluded
behavioural_and_inferred
required

Behavioural and inferred data present

string
Allowed values: unknown included excluded
classification
required

Classification level

string
Allowed values: unknown public internal confidential restricted secret
contact_information
required

Contact information present

string
Allowed values: unknown included excluded
criminal_justice
required

Criminal justice data present

string
Allowed values: unknown included excluded
financial_information
required

Financial information present

string
Allowed values: unknown included excluded
gdpr_biometric_for_identification
required

GDPR: biometric data for identification

string
Allowed values: unknown included excluded
gdpr_genetic_data
required

GDPR: genetic data

string
Allowed values: unknown included excluded
gdpr_political_opinions
required

GDPR: political opinions

string
Allowed values: unknown included excluded
gdpr_racial_or_ethnic_origin
required

GDPR: racial or ethnic origin

string
Allowed values: unknown included excluded
gdpr_religious_or_philosophical_beliefs
required

GDPR: religious or philosophical beliefs

string
Allowed values: unknown included excluded
gdpr_sex_life_or_sexual_orientation
required

GDPR: sex life or sexual orientation

string
Allowed values: unknown included excluded
gdpr_trade_union_membership
required

GDPR: trade union membership

string
Allowed values: unknown included excluded
health_and_medical
required

Health and medical data present

string
Allowed values: unknown included excluded
location_and_tracking
required

Location and tracking data present

string
Allowed values: unknown included excluded
minors_data
required

Minors data present

string
Allowed values: unknown included excluded
organisational_confidential
required

Organisational confidential data present

string
Allowed values: unknown included excluded
personal_identifiers
required

Personal identifiers present

string
Allowed values: unknown included excluded
finished_at
required
One of:

When the span finished (null if still in progress)

string format: date-time
id
required
AgentSpan_Id

A valid agent span ID

string
parent_span_id
required
One of:
AgentSpan_Id

A valid agent span ID

string
payload
required

Span payload data (arbitrary JSON object)

object
key
additional properties
any
payload_byte_size_estimate
required

Approximate JSON-encoded byte size of the span’s stored payload columns. This is an estimate, not an exact on-disk size.

integer
purpose
required

Purpose of the span: ‘activity’ (normal agent activity), ‘quality’ (system-written span recording an agent instance quality payload update), or ‘alert’ (system-written span recording an alert lifecycle event). Quality-purpose and alert-purpose spans are excluded from standard span metrics.

string
Allowed values: activity quality alert
result_payload
required
One of:

Result payload (arbitrary JSON), only present when span is finished

object
key
additional properties
any
schema_name
required

Name of the schema for this span

string
schema_title
required

Human-readable title for the schema (from JSON schema, defaults to schema_name)

string
sensitive_encoding
required

When true, both payload and result_payload should be interpreted as containing sensitive markers as per the specification

boolean
started_at
required

When the span started

string format: date-time
status
required

Status of the span: ‘active’ (started but not finished), ‘complete’ (finished successfully), ‘failed’ (ended with failure), or ‘cancelled’ (started but cancelled before completion)

string
Allowed values: active complete failed cancelled
summary
required
One of:

Human-readable summary rendered from the schema template using payload and result_payload (null when template is missing). When the request sets redacted to true, sensitive values in the summary are replaced with redaction labels.

string
type
required

Type of resource (always ‘agent_span’)

string
Allowed values: agent_span
status
required
string
Allowed values: success
Example
{
"details": {
"account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"agent_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"agent_instance_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"data_risk": null,
"finished_at": "2024-01-01T00:00:00Z",
"id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"parent_span_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"purpose": "activity",
"result_payload": null,
"schema_name": "llm",
"schema_title": "LLM",
"started_at": "2024-01-01T00:00:00Z",
"status": "active",
"summary": null,
"type": "agent_span"
},
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
required
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used temporarily_unavailable conflict
message
required
string
status
required
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}