openapi: 3.0.3
info:
title: PostHog actions external_data_sources API
version: 1.0.0
description: ''
tags:
- name: external_data_sources
paths:
/api/environments/{environment_id}/external_data_sources/:
get:
operationId: environments_external_data_sources_list
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
- name: search
required: false
in: query
description: A search term.
schema:
type: string
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedExternalDataSourceSerializersList'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
post:
operationId: environments_external_data_sources_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceCreate'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceCreate'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceCreate'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/:
get:
operationId: environments_external_data_sources_retrieve
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
put:
operationId: environments_external_data_sources_update
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
patch:
operationId: environments_external_data_sources_partial_update
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
delete:
operationId: environments_external_data_sources_destroy
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'204':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/bulk_update_schemas/:
patch:
operationId: environments_external_data_sources_bulk_update_schemas_partial_update
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
- name: search
required: false
in: query
description: A search term.
schema:
type: string
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceBulkUpdateSchemas'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceBulkUpdateSchemas'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceBulkUpdateSchemas'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedExternalDataSchemaList'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/create_webhook/:
post:
operationId: environments_external_data_sources_create_webhook_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/delete_webhook/:
post:
operationId: environments_external_data_sources_delete_webhook_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/jobs/:
get:
operationId: environments_external_data_sources_jobs_retrieve
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/refresh_schemas/:
post:
operationId: environments_external_data_sources_refresh_schemas_create
description: Fetch current schema/table list from the source and create any new ExternalDataSchema rows (no data sync).
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/reload/:
post:
operationId: environments_external_data_sources_reload_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/revenue_analytics_config/:
patch:
operationId: environments_external_data_sources_revenue_analytics_config_partial_update
description: Update the revenue analytics configuration and return the full external data source.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/update_webhook_inputs/:
post:
operationId: environments_external_data_sources_update_webhook_inputs_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/{id}/webhook_info/:
get:
operationId: environments_external_data_sources_webhook_info_retrieve
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/check_cdc_prerequisites/:
post:
operationId: environments_external_data_sources_check_cdc_prerequisites_create
description: 'Validate CDC prerequisites against a live Postgres connection.
Used by the source wizard to surface ✅/❌ checks before source creation,
and by the self-managed setup popup to verify user-created publications.'
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
content:
application/json:
schema:
type: object
properties:
valid:
type: boolean
errors:
type: array
items:
type: string
description: Whether the Postgres database satisfies CDC prerequisites.
'400':
description: Invalid config, disallowed host, or connection failure.
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/connections/:
get:
operationId: environments_external_data_sources_connections_list
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
- name: search
required: false
in: query
description: A search term.
schema:
type: string
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedExternalDataSourceConnectionOptionList'
description: ''
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/database_schema/:
post:
operationId: environments_external_data_sources_database_schema_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DatabaseSchemaRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/DatabaseSchemaRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/DatabaseSchemaRequest'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/source_prefix/:
post:
operationId: environments_external_data_sources_source_prefix_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/environments/{environment_id}/external_data_sources/wizard/:
get:
operationId: environments_external_data_sources_wizard_retrieve
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/EnvironmentIdPath'
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
description: No response body
deprecated: true
x-explicit-tags:
- data_warehouse
/api/projects/{project_id}/external_data_sources/:
get:
operationId: external_data_sources_list
description: Create, Read, Update and Delete External data Sources.
parameters:
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
- $ref: '#/components/parameters/ProjectIdPath'
- name: search
required: false
in: query
description: A search term.
schema:
type: string
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedExternalDataSourceSerializersList'
description: ''
x-explicit-tags:
- data_warehouse
post:
operationId: external_data_sources_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceCreate'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceCreate'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceCreate'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
x-explicit-tags:
- data_warehouse
/api/projects/{project_id}/external_data_sources/{id}/:
get:
operationId: external_data_sources_retrieve
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:read
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
x-explicit-tags:
- data_warehouse
put:
operationId: external_data_sources_update
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
x-explicit-tags:
- data_warehouse
patch:
operationId: external_data_sources_partial_update
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceSerializers'
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
description: ''
x-explicit-tags:
- data_warehouse
delete:
operationId: external_data_sources_destroy
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'204':
description: No response body
x-explicit-tags:
- data_warehouse
/api/projects/{project_id}/external_data_sources/{id}/bulk_update_schemas/:
patch:
operationId: external_data_sources_bulk_update_schemas_partial_update
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- name: limit
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: offset
required: false
in: query
description: The initial index from which to return the results.
schema:
type: integer
- $ref: '#/components/parameters/ProjectIdPath'
- name: search
required: false
in: query
description: A search term.
schema:
type: string
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceBulkUpdateSchemas'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceBulkUpdateSchemas'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedExternalDataSourceBulkUpdateSchemas'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedExternalDataSchemaList'
description: ''
x-explicit-tags:
- data_warehouse
/api/projects/{project_id}/external_data_sources/{id}/create_webhook/:
post:
operationId: external_data_sources_create_webhook_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
x-explicit-tags:
- data_warehouse
/api/projects/{project_id}/external_data_sources/{id}/delete_webhook/:
post:
operationId: external_data_sources_delete_webhook_create
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
multipart/form-data:
schema:
$ref: '#/components/schemas/ExternalDataSourceSerializers'
required: true
security:
- PersonalAPIKeyAuth:
- external_data_source:write
responses:
'200':
description: No response body
x-explicit-tags:
- data_warehouse
/api/projects/{project_id}/external_data_sources/{id}/jobs/:
get:
operationId: external_data_sources_jobs_retrieve
description: Create, Read, Update and Delete External data Sources.
parameters:
- in: path
name: id
schema:
type: string
format: uuid
description: A UUID string identifying this external data source.
required: true
- $ref: '#/components/parameters/ProjectIdPath'
tags:
- external_data_sources
security:
- PersonalAPIKeyAuth:
- external_data
# --- truncated at 32 KB (79 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-external-data-sources-api-openapi.yml