Python
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
anonymization_run = client.dataframer.anonymization_runs.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(anonymization_run.id)curl https://df-api.dataframer.ai/api/dataframer/anonymization-runs/$RUN_ID/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_name": "<string>",
"pii_types": [
"<string>"
],
"detection_method": "<string>",
"llm_model_name": "<string>",
"created_by_email": "jsmith@example.com",
"duration_seconds": 123,
"results": {
"entity_summary": {},
"samples_processed": 123,
"entities_found": [
{
"start": 123,
"end": 123,
"label": "<string>",
"score": 123
}
],
"error": "<string>"
},
"anonymized_files": [
{
"id": "<string>",
"path": "<string>",
"size_in_bytes": 123,
"content_type": "<string>"
}
],
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}Anonymization
Get Anonymization Run
Retrieve an anonymization run by ID. Also use this endpoint to poll for completion.
GET
/
api
/
dataframer
/
anonymization-runs
/
{run_id}
/
Python
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
anonymization_run = client.dataframer.anonymization_runs.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(anonymization_run.id)curl https://df-api.dataframer.ai/api/dataframer/anonymization-runs/$RUN_ID/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_name": "<string>",
"pii_types": [
"<string>"
],
"detection_method": "<string>",
"llm_model_name": "<string>",
"created_by_email": "jsmith@example.com",
"duration_seconds": 123,
"results": {
"entity_summary": {},
"samples_processed": 123,
"entities_found": [
{
"start": 123,
"end": 123,
"label": "<string>",
"score": 123
}
],
"error": "<string>"
},
"anonymized_files": [
{
"id": "<string>",
"path": "<string>",
"size_in_bytes": 123,
"content_type": "<string>"
}
],
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}Authorizations
Response
Anonymization run details
Set when results.entities_found and anonymized_files are empty because they are stored in your own cloud, not because no PII was found. The counts in results are still complete. Absent or null otherwise. The Python SDK reads the text from your data plane, fills the fields and clears this
Available options:
result_content_in_data_plane 
