Skip to main content
Twelve endpoints for synthetic population generation. All public.

POST /api/flock/connect

Connect to a database and analyze its schema.
FieldTypeDescription
providerstringpostgres, mysql, sqlserver
connectionStringstringDatabase connection string
curl
curl -X POST https://api.pidgeon.health/api/flock/connect \
  -H "Content-Type: application/json" \
  -d '{"provider": "postgres", "connectionString": "Host=localhost;Port=5432;Database=ehr;Username=dev;Password=secret"}'

GET /api/flock/schema

Get the analyzed schema from the last connection.
curl
curl https://api.pidgeon.health/api/flock/schema

POST /api/flock/learn

Learn statistical patterns from existing sample data.
curl
curl -X POST https://api.pidgeon.health/api/flock/learn \
  -H "Content-Type: application/json" \
  -d '{"tables": ["patients", "encounters"], "sampleSize": 500}'

GET /api/flock/profiles

List learned profiles.
curl
curl https://api.pidgeon.health/api/flock/profiles

GET /api/flock/profiles/

Get a specific profile.
curl
curl https://api.pidgeon.health/api/flock/profiles/ehr_production

POST /api/flock/generate

Start a generation job. Returns a job ID for polling.
FieldTypeDefaultDescription
countint100Number of patients
formatstring"sql"sql, csv, hl7, fhir
geographicFocusstring"us"Geographic distribution
seedintnullReproducible seed
curl
curl -X POST https://api.pidgeon.health/api/flock/generate \
  -H "Content-Type: application/json" \
  -d '{"count": 1000, "format": "sql", "geographicFocus": "us"}'

GET /api/flock/generate/

Poll job status.
curl
curl https://api.pidgeon.health/api/flock/generate/job-123

GET /api/flock/generate//analytics

Get analytics for a completed job.
curl
curl https://api.pidgeon.health/api/flock/generate/job-123/analytics

POST /api/flock/seed

Seed the connected database with generated data.
curl
curl -X POST https://api.pidgeon.health/api/flock/seed \
  -H "Content-Type: application/json" \
  -d '{"jobId": "job-123"}'

POST /api/flock/seed/dry-run

Preview SQL without executing.
curl
curl -X POST https://api.pidgeon.health/api/flock/seed/dry-run \
  -H "Content-Type: application/json" \
  -d '{"jobId": "job-123"}'

DELETE /api/flock/seed/cleanup

Remove all synthetic data from the database.
Query ParamTypeDescription
connectionStringstringDatabase connection
providerstringDatabase type
curl
curl -X DELETE "https://api.pidgeon.health/api/flock/seed/cleanup?connectionString=Host%3Dlocalhost%3BDatabase%3Dehr&provider=postgres"

GET /api/flock/compliance/

Get a compliance report for a generation job.
curl
curl https://api.pidgeon.health/api/flock/compliance/job-123