Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

3.4 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "access_method": {
            "default": "warehouse",
            "description": "Connection mode: 'warehouse' (import) or 'direct' (live query).\n\n* `warehouse` - warehouse\n* `direct` - direct",
            "enum": ["warehouse", "direct"],
            "type": "string"
        },
        "description": {
            "anyOf": [
                {
                    "maxLength": 400,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Human-readable description."
        },
        "destination_ids": {
            "description": "Destinations every table on this source writes to. Set here rather than afterwards, so the opening sync already carries them. Omit to write to the PostHog warehouse only.",
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "direct_query_enabled": {
            "default": false,
            "description": "Whether a synced source should also be live-queryable via direct connection. Defaults to false; ignored for pure direct-query sources.",
            "type": "boolean"
        },
        "payload": {
            "additionalProperties": {},
            "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. That array is optional: omit it and every discovered table syncs with default settings. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.",
            "propertyNames": {
                "type": "string"
            },
            "type": "object"
        },
        "prefix": {
            "anyOf": [
                {
                    "maxLength": 100,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported."
        },
        "source_type": {
            "description": "The source type name (e.g. \"Postgres\", \"MySQL\", \"Stripe\"). Use external-data-sources-wizard to see available types and their required fields.",
            "type": "string"
        }
    },
    "required": ["source_type", "payload"],
    "type": "object"
}