Data

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

Endpoints

GET
POST
GET
DELETE
POST
POST
GET
POST
GET
PATCH
DELETE
POST
POST
POST
POST
POST
GET
POST
GET

List all data catalog certifications

Trust marks on warehouse tables and views. Reads exclude soft-deleted targets.

Required API key scopes

data_catalog:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"saved_query": "e3652b9e-1a82-4fa6-9330-52b013787fcc",
"target_type": "string",
"target_name": "string",
"status": "string",
"proposed_status": "string",
"notes": "string",
"certified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"certified_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Create data catalog certifications

Trust marks on warehouse tables and views. Reads exclude soft-deleted targets.

Required API key scopes

data_catalog:write

Request parameters

  • table_id
    string
  • saved_query_id
    string
  • table_name
    string
  • view_name
    string
  • notes
    string
  • proposed_status
    Default: certified

Response


Example request

POST /api/projects/:project_id/data_catalog/certifications
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/data_catalog/certifications/\
-d table_id="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"saved_query": "e3652b9e-1a82-4fa6-9330-52b013787fcc",
"target_type": "string",
"target_name": "string",
"status": "string",
"proposed_status": "string",
"notes": "string",
"certified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"certified_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}

Retrieve data catalog certifications

Trust marks on warehouse tables and views. Reads exclude soft-deleted targets.

Required API key scopes

data_catalog:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"saved_query": "e3652b9e-1a82-4fa6-9330-52b013787fcc",
"target_type": "string",
"target_name": "string",
"status": "string",
"proposed_status": "string",
"notes": "string",
"certified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"certified_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}

Delete data catalog certifications

Trust marks on warehouse tables and views. Reads exclude soft-deleted targets.

Required API key scopes

data_catalog_approval:writedata_catalog:read

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/data_catalog/certifications/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/data_catalog/certifications/:id/

Example response

Status 204 No response body

Create data catalog certifications certify

Mark the target as certified (prefer this source).

Required API key scopes

data_catalog_approval:writedata_catalog:read

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/data_catalog/certifications/:id/certify
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/data_catalog/certifications/:id/certify/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"saved_query": "e3652b9e-1a82-4fa6-9330-52b013787fcc",
"target_type": "string",
"target_name": "string",
"status": "string",
"proposed_status": "string",
"notes": "string",
"certified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"certified_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}

Create data catalog certifications deprecate

Mark the target as deprecated (avoid this source).

Required API key scopes

data_catalog_approval:writedata_catalog:read

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/data_catalog/certifications/:id/deprecate
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/data_catalog/certifications/:id/deprecate/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"saved_query": "e3652b9e-1a82-4fa6-9330-52b013787fcc",
"target_type": "string",
"target_name": "string",
"status": "string",
"proposed_status": "string",
"notes": "string",
"certified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"certified_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}

List all data catalog metrics

CRUD for catalog metrics, addressed by their name (e.g. /metrics/mrr/).

Required API key scopes

data_catalog:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Create data catalog metrics

Create a metric, or refine the one already holding this name for the team.

Required API key scopes

data_catalog:write

Request parameters

  • name
    string
  • display_name
    string
  • description
    string
  • unit
    string
  • definition
    object | null
  • source_insight_short_id
    string | null
  • created_source
  • ai_model
    string
  • confidence
    number | null
  • reasoning
    string

Response


Example request

POST /api/projects/:project_id/data_catalog/metrics
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/data_catalog/metrics/\
-d name="string",\
-d description="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Retrieve data catalog metrics

CRUD for catalog metrics, addressed by their name (e.g. /metrics/mrr/).

Required API key scopes

data_catalog:read

Path parameters

  • name
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Update data catalog metrics

CRUD for catalog metrics, addressed by their name (e.g. /metrics/mrr/).

Required API key scopes

data_catalog:write

Path parameters

  • name
    string

Request parameters

  • name
    string
  • display_name
    string
  • description
    string
  • unit
    string
  • definition
    object | null
  • source_insight_short_id
    string | null
  • created_source
  • ai_model
    string
  • confidence
    number | null
  • reasoning
    string

Response


Example request

PATCH /api/projects/:project_id/data_catalog/metrics/:name
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/data_catalog/metrics/:name/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Delete data catalog metrics

CRUD for catalog metrics, addressed by their name (e.g. /metrics/mrr/).

Required API key scopes

data_catalog:write

Path parameters

  • name
    string

Example request

DELETE /api/projects/:project_id/data_catalog/metrics/:name
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/data_catalog/metrics/:name/

Example response

Status 204 No response body

Create data catalog metrics approve

Bless a metric as canonical. Returns 409 while the metric is drifted from its insight.

Required API key scopes

data_catalog_approval:writedata_catalog:read

Path parameters

  • name
    string

Response


Example request

POST /api/projects/:project_id/data_catalog/metrics/:name/approve
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/data_catalog/metrics/:name/approve/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Create data catalog metrics refresh from insight

Re-snapshot the linked insight's current query into the definition.

Required API key scopes

data_catalog:writeinsight:read

Path parameters

  • name
    string

Response


Example request

POST /api/projects/:project_id/data_catalog/metrics/:name/refresh_from_insight
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/data_catalog/metrics/:name/refresh_from_insight/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Create data catalog metrics run

Execute the metric's definition and return the normalized result envelope.

Required API key scopes

data_catalog:readquery:read

Path parameters

  • name
    string

Query parameters

  • refresh
    string
    One of: "blocking""async""lazy_async""force_blocking""force_async""force_cache"

Request parameters

  • date_from
    string
  • date_to
    string
  • interval
  • query_id
    string

Response


Example request

POST /api/projects/:project_id/data_catalog/metrics/:name/run
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/data_catalog/metrics/:name/run/\
-d date_from="string"

Example response

Status 200 The normalized run envelope.
RESPONSE
{
"status": "string",
"is_drifted": true,
"unit": "string",
"kind": "string",
"results": null,
"columns": [
"string"
],
"compiled_query": "string",
"query_status": null,
"has_more": true,
"row_limit": 0,
"posthog_url": "string",
"instructions": "string"
}
Status 400 The metric has no runnable definition, an override is invalid for its kind, or the query failed.
Status 429 Query rate limit or concurrency limit exceeded.
Status 500 Unexpected error while executing the query.

Create data catalog metrics bulk approve

Approve many metrics as canonical. Unknown, already-approved, and drifted metrics are skipped.

Required API key scopes

data_catalog_approval:writedata_catalog:read

Request parameters

  • names
    array

Response


Example request

POST /api/projects/:project_id/data_catalog/metrics/bulk_approve
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/data_catalog/metrics/bulk_approve/\
-d names="array"

Example response

Status 200
RESPONSE
{
"approved": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"display_name": "string",
"description": "string",
"unit": "string",
"owner": "string",
"definition": {},
"definition_kind": "string",
"referenced_table_names": null,
"status": "string",
"is_drifted": true,
"approved_at": "2019-08-24T14:15:22Z",
"approved_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"source_insight_short_id": "string",
"last_run_at": "2019-08-24T14:15:22Z",
"created_source": "user",
"ai_model": "string",
"confidence": 1,
"reasoning": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"skipped": [
{
"name": "string",
"reason": "string"
}
]
}

Create data catalog metrics bulk delete

Delete many metrics, freeing their names for reuse. Unknown metrics are skipped.

Required API key scopes

data_catalog:write

Request parameters

  • names
    array

Response


Example request

POST /api/projects/:project_id/data_catalog/metrics/bulk_delete
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/data_catalog/metrics/bulk_delete/\
-d names="array"

Example response

Status 200
RESPONSE
{
"deleted": [
"string"
],
"skipped": [
{
"name": "string",
"reason": "string"
}
]
}

List all data catalog relationship proposals

Reviewed join facts. Accepting one promotes it to a real DataWarehouseJoin; rejections persist.

Required API key scopes

data_catalog:read

Query parameters

  • limit
    integer
  • offset
    integer
  • status
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source_table_name": "string",
"source_table_key": "string",
"joining_table_name": "string",
"joining_table_key": "string",
"field_name": "string",
"configuration": null,
"confidence": 1,
"reasoning": "string",
"evidence": null,
"status": "string",
"reviewed_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"reviewed_at": "2019-08-24T14:15:22Z",
"rejection_reason": "string",
"created_join": "9777f0a1-3fe4-48b8-bdd9-017c737fe4e5",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Create data catalog relationship proposals

Reviewed join facts. Accepting one promotes it to a real DataWarehouseJoin; rejections persist.

Required API key scopes

data_catalog:write

Request parameters

  • source_table_name
    string
  • source_table_key
    string
  • joining_table_name
    string
  • joining_table_key
    string
  • field_name
    string
  • configuration
  • confidence
    number | null
  • reasoning
    string
  • evidence

Response


Example request

POST /api/projects/:project_id/data_catalog/relationship_proposals
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/data_catalog/relationship_proposals/\
-d source_table_name="string",\
-d source_table_key="string",\
-d joining_table_name="string",\
-d joining_table_key="string",\
-d field_name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source_table_name": "string",
"source_table_key": "string",
"joining_table_name": "string",
"joining_table_key": "string",
"field_name": "string",
"configuration": null,
"confidence": 1,
"reasoning": "string",
"evidence": null,
"status": "string",
"reviewed_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"reviewed_at": "2019-08-24T14:15:22Z",
"rejection_reason": "string",
"created_join": "9777f0a1-3fe4-48b8-bdd9-017c737fe4e5",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}

Retrieve data catalog relationship proposals

Reviewed join facts. Accepting one promotes it to a real DataWarehouseJoin; rejections persist.

Required API key scopes

data_catalog:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source_table_name": "string",
"source_table_key": "string",
"joining_table_name": "string",
"joining_table_key": "string",
"field_name": "string",
"configuration": null,
"confidence": 1,
"reasoning": "string",
"evidence": null,
"status": "string",
"reviewed_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"reviewed_at": "2019-08-24T14:15:22Z",
"rejection_reason": "string",
"created_join": "9777f0a1-3fe4-48b8-bdd9-017c737fe4e5",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z"
}