Skip to Content
API ReferenceConnectors

Connectors

Connectors integrate Expunct with cloud storage providers for automated, scheduled scanning and redaction of files.

Connector Object

FieldTypeDescription
idstringUnique connector identifier
providerstringCloud provider (s3 or gcs)
bucketstringBucket name
prefixstringObject key prefix to scope scanning
schedule_cronstringCron expression for automatic sync
policy_idstringRedaction policy to apply
activebooleanWhether the connector is active
last_sync_atstringISO 8601 timestamp of last sync
created_atstringISO 8601 timestamp

GET /connectors

List all connectors for the current tenant.

Example

curl https://api.pii-redactor.dev/api/v1/connectors \ -H "X-API-Key: pk_live_abc123"
[ { "id": "con_j1k2l3", "provider": "s3", "bucket": "my-documents", "prefix": "incoming/", "schedule_cron": "0 */6 * * *", "policy_id": "pol_h1i2p3a4", "active": true, "last_sync_at": "2026-02-13T06:00:00Z", "created_at": "2026-02-01T10:00:00Z" } ]

POST /connectors

Create a new connector.

Request Body

FieldTypeRequiredDescription
providerstringYess3 or gcs
bucketstringYesBucket name
prefixstringNoObject key prefix (default: empty, scans entire bucket)
schedule_cronstringNoCron schedule for automatic sync
policy_idstringNoRedaction policy to apply

Example

curl -X POST https://api.pii-redactor.dev/api/v1/connectors \ -H "X-API-Key: pk_live_abc123" \ -H "Content-Type: application/json" \ -d '{ "provider": "s3", "bucket": "my-documents", "prefix": "incoming/", "schedule_cron": "0 */6 * * *", "policy_id": "pol_h1i2p3a4" }'
{ "id": "con_j1k2l3", "provider": "s3", "bucket": "my-documents", "prefix": "incoming/", "schedule_cron": "0 */6 * * *", "policy_id": "pol_h1i2p3a4", "active": true, "last_sync_at": null, "created_at": "2026-02-13T10:00:00Z" }

GET /connectors/{id}

Get a specific connector.

curl https://api.pii-redactor.dev/api/v1/connectors/con_j1k2l3 \ -H "X-API-Key: pk_live_abc123"

PUT /connectors/{id}

Update a connector. Only provided fields are updated.

curl -X PUT https://api.pii-redactor.dev/api/v1/connectors/con_j1k2l3 \ -H "X-API-Key: pk_live_abc123" \ -H "Content-Type: application/json" \ -d '{"schedule_cron": "0 0 * * *", "prefix": "documents/"}'

DELETE /connectors/{id}

Soft-delete a connector. Stops scheduled syncs.

curl -X DELETE https://api.pii-redactor.dev/api/v1/connectors/con_j1k2l3 \ -H "X-API-Key: pk_live_abc123"
{ "detail": "Connector deleted" }

POST /connectors/{id}/test

Test the connection to the cloud storage bucket. Validates credentials and access permissions without syncing files.

curl -X POST https://api.pii-redactor.dev/api/v1/connectors/con_j1k2l3/test \ -H "X-API-Key: pk_live_abc123"
{ "status": "ok", "message": "Successfully connected to s3://my-documents/incoming/" }

Returns an error message if the connection fails:

{ "status": "error", "message": "Access denied: check IAM permissions for the bucket" }

POST /connectors/{id}/sync

Manually trigger a sync for the connector. Files matching the prefix are scanned and redacted according to the associated policy.

Returns 202 Accepted immediately. The sync runs asynchronously.

curl -X POST https://api.pii-redactor.dev/api/v1/connectors/con_j1k2l3/sync \ -H "X-API-Key: pk_live_abc123"
{ "detail": "Sync triggered" }