Warehouse Column

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

Endpoints

GET
POST
GET
PATCH
DELETE

List all warehouse column annotations

Read and edit semantic descriptions of warehouse tables and columns surfaced to the AI agent.

List can be filtered to one table with ?table_id=<uuid>. Any create or update is treated as a user edit (is_user_edited=True), which protects the row from being overwritten by automatic enrichment. Create upserts on (table, column_name); the table cannot be changed after creation.

Required API key scopes

warehouse_table:read

Query parameters

  • limit
    integer
  • offset
    integer
  • table_id
    string

Response


Example request

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

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",
"column_name": "string",
"description": "string",
"description_source": "canonical",
"ai_model": "string",
"is_user_edited": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Create warehouse column annotations

Read and edit semantic descriptions of warehouse tables and columns surfaced to the AI agent.

List can be filtered to one table with ?table_id=<uuid>. Any create or update is treated as a user edit (is_user_edited=True), which protects the row from being overwritten by automatic enrichment. Create upserts on (table, column_name); the table cannot be changed after creation.

Required API key scopes

warehouse_table:write

Request parameters

  • table
    string
  • column_name
    string
  • description
    string

Response


Example request

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

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"column_name": "string",
"description": "string",
"description_source": "canonical",
"ai_model": "string",
"is_user_edited": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Retrieve warehouse column annotations

Read and edit semantic descriptions of warehouse tables and columns surfaced to the AI agent.

List can be filtered to one table with ?table_id=<uuid>. Any create or update is treated as a user edit (is_user_edited=True), which protects the row from being overwritten by automatic enrichment. Create upserts on (table, column_name); the table cannot be changed after creation.

Required API key scopes

warehouse_table:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/warehouse_column_annotations/: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/warehouse_column_annotations/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"column_name": "string",
"description": "string",
"description_source": "canonical",
"ai_model": "string",
"is_user_edited": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Update warehouse column annotations

Read and edit semantic descriptions of warehouse tables and columns surfaced to the AI agent.

List can be filtered to one table with ?table_id=<uuid>. Any create or update is treated as a user edit (is_user_edited=True), which protects the row from being overwritten by automatic enrichment. Create upserts on (table, column_name); the table cannot be changed after creation.

Required API key scopes

warehouse_table:write

Path parameters

  • id
    string

Request parameters

  • table
    string
  • column_name
    string
  • description
    string

Response


Example request

PATCH /api/projects/:project_id/warehouse_column_annotations/:id
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/warehouse_column_annotations/:id/\
-d table="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"column_name": "string",
"description": "string",
"description_source": "canonical",
"ai_model": "string",
"is_user_edited": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Delete warehouse column annotations

Read and edit semantic descriptions of warehouse tables and columns surfaced to the AI agent.

List can be filtered to one table with ?table_id=<uuid>. Any create or update is treated as a user edit (is_user_edited=True), which protects the row from being overwritten by automatic enrichment. Create upserts on (table, column_name); the table cannot be changed after creation.

Required API key scopes

warehouse_table:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/warehouse_column_annotations/: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/warehouse_column_annotations/:id/

Example response

Status 204 No response body

Community questions