External Data

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

POST
POST
PATCH
POST
POST
GET

Create external data sources refresh schemas

Fetch current schema/table list from the source and create any new ExternalDataSchema rows (no data sync).

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • client_secret
    string
  • account_id
    string
  • description
    string
  • job_inputs

Example request

POST /api/projects/:project_id/external_data_sources/:id/refresh_schemas
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/external_data_sources/:id/refresh_schemas/\
-d client_secret="string",\
-d account_id="string"

Example response

Status 200 No response body

Create external data sources reload

Create, Read, Update and Delete External data Sources.

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • client_secret
    string
  • account_id
    string
  • description
    string
  • job_inputs

Example request

POST /api/projects/:project_id/external_data_sources/:id/reload
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/external_data_sources/:id/reload/\
-d client_secret="string",\
-d account_id="string"

Example response

Status 200 No response body

Update external data sources revenue analytics config

Update the revenue analytics configuration and return the full external data source.

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • client_secret
    string
  • account_id
    string
  • description
    string
  • job_inputs

Example request

PATCH /api/projects/:project_id/external_data_sources/:id/revenue_analytics_config
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/external_data_sources/:id/revenue_analytics_config/\
-d created_at="string"

Example response

Status 200 No response body

Create external data sources database schema

Create, Read, Update and Delete External data Sources.

Path parameters

  • project_id
    string

Request parameters

  • client_secret
    string
  • account_id
    string
  • description
    string
  • job_inputs

Example request

POST /api/projects/:project_id/external_data_sources/database_schema
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/external_data_sources/database_schema/\
-d client_secret="string",\
-d account_id="string"

Example response

Status 200 No response body

Create external data sources source prefix

Create, Read, Update and Delete External data Sources.

Path parameters

  • project_id
    string

Request parameters

  • client_secret
    string
  • account_id
    string
  • description
    string
  • job_inputs

Example request

POST /api/projects/:project_id/external_data_sources/source_prefix
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/external_data_sources/source_prefix/\
-d client_secret="string",\
-d account_id="string"

Example response

Status 200 No response body

Retrieve external data sources wizard

Create, Read, Update and Delete External data Sources.

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/external_data_sources/wizard
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/external_data_sources/wizard/

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.