Batch Processing
Submit multiple files for redaction in a single request. Each file in the batch creates an individual job that can be tracked independently.
Limits
- Maximum 100 URIs per batch request.
- Each URI creates a separate async job.
POST /batch/redact
Submit a batch of files for redaction.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
input_uris | string[] | Yes | List of file URIs to redact (max 100) |
policy_id | string | No | Apply a saved redaction policy to all files |
Response
| Field | Type | Description |
|---|---|---|
batch_id | string | Unique identifier for the batch |
job_ids | string[] | List of individual job IDs created |
total | number | Total number of jobs in the batch |
completed | number | Number of completed jobs (initially 0) |
failed | number | Number of failed jobs (initially 0) |
Example
curl -X POST https://api.pii-redactor.dev/api/v1/batch/redact \
-H "X-API-Key: pk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"input_uris": [
"s3://my-bucket/docs/contract-001.pdf",
"s3://my-bucket/docs/contract-002.pdf",
"s3://my-bucket/docs/contract-003.pdf"
],
"policy_id": "pol_hipaa_standard"
}'{
"batch_id": "batch_a1b2c3d4",
"job_ids": [
"job_f1e2d3c4",
"job_a5b6c7d8",
"job_e9f0a1b2"
],
"total": 3,
"completed": 0,
"failed": 0
}GET /batch/{batch_id}
Get the status of a batch and its constituent jobs.
Response
| Field | Type | Description |
|---|---|---|
batch_id | string | Batch identifier |
job_ids | string[] | List of job IDs in the batch |
total | number | Total number of jobs |
completed | number | Number of completed jobs |
failed | number | Number of failed jobs |
Example
curl https://api.pii-redactor.dev/api/v1/batch/batch_a1b2c3d4 \
-H "X-API-Key: pk_live_abc123"{
"batch_id": "batch_a1b2c3d4",
"job_ids": [
"job_f1e2d3c4",
"job_a5b6c7d8",
"job_e9f0a1b2"
],
"total": 3,
"completed": 2,
"failed": 0
}To get details on individual jobs within the batch, use GET /jobs/{job_id} for each job ID. See Jobs for details.