API Documentation (v1)

Endpoint

POST /api/v1/generate/sql

Returns generated PostgreSQL INSERT SQL as file stream.

Request Body

{
  "table_definition": "CREATE TABLE users (id BIGSERIAL, email TEXT, active BOOLEAN, profile JSONB)",
  "rows": 1000,
  "options": {
    "batch_size": 500
  }
}

Limits

  • 10 requests per minute per IP
  • Max rows: 100,000
  • Execution safety cap for long generation jobs
  • High-volume requests: If you need more than 1,000,000 records, reach out to kedar@nitty-witty.com.

Example cURL

curl -X POST https://nitty-witty.com/postgres-random-data-generator/api/v1/generate/sql \
  -H "Content-Type: application/json" \
  -d '{
    "table_definition":"CREATE TABLE users(id BIGSERIAL,email TEXT,created_at TIMESTAMPTZ)",
    "rows":200
  }' --output generated-postgres.sql

Supported Type Families

Numeric, text, boolean, temporal, UUID, JSON/JSONB, BYTEA, arrays, network, and geometric types with fallback for custom/user-defined types.