Environments-29

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

Create, Read, Update and Delete Warehouse Tables.

Endpoints

GET
POST
GET
PATCH
DELETE
GET
POST
POST
GET

List all environments warehouse saved queries

Required API key scopes

warehouse_view:read

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Query parameters

  • page
    integer

    A page number within the paginated result set.

  • search
    string

    A search term.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}
]
}

List all environments warehouse saved queries

Required API key scopes

warehouse_view:read

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Query parameters

  • page
    integer

    A page number within the paginated result set.

  • search
    string

    A search term.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}
]
}

Create environments warehouse saved queries

Required API key scopes

warehouse_view:write

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

POST /api/environments/:project_id/warehouse_saved_queries
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/environments/:project_id/warehouse_saved_queries/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Create environments warehouse saved queries

Required API key scopes

warehouse_view:write

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

POST /api/environments/:project_id/warehouse_saved_queries
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/environments/:project_id/warehouse_saved_queries/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Retrieve environments warehouse saved queries

Required API key scopes

warehouse_view:read

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Retrieve environments warehouse saved queries

Required API key scopes

warehouse_view:read

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Update environments warehouse saved queries

Required API key scopes

warehouse_view:write

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

PATCH /api/environments/:project_id/warehouse_saved_queries/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/warehouse_saved_queries/:id/\
-d deleted="boolean"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Update environments warehouse saved queries

Required API key scopes

warehouse_view:write

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

PATCH /api/environments/:project_id/warehouse_saved_queries/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/warehouse_saved_queries/:id/\
-d deleted="boolean"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Delete environments warehouse saved queries

Required API key scopes

warehouse_view:write

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

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

Example response

Status 204 No response body

Delete environments warehouse saved queries

Required API key scopes

warehouse_view:write

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

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

Example response

Status 204 No response body

Retrieve environments warehouse saved queries activity

Required API key scopes

activity_log:read

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Retrieve environments warehouse saved queries activity

Required API key scopes

activity_log:read

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Create environments warehouse saved queries ancestors

Return the ancestors of this saved query.

By default, we return the immediate parents. The level parameter can be used to look further back into the ancestor tree. If level overshoots (i.e. points to only ancestors beyond the root), we return an empty list.

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

POST /api/environments/:project_id/warehouse_saved_queries/:id/ancestors
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/environments/:project_id/warehouse_saved_queries/:id/ancestors/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Create environments warehouse saved queries ancestors

Return the ancestors of this saved query.

By default, we return the immediate parents. The level parameter can be used to look further back into the ancestor tree. If level overshoots (i.e. points to only ancestors beyond the root), we return an empty list.

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

POST /api/environments/:project_id/warehouse_saved_queries/:id/ancestors
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/environments/:project_id/warehouse_saved_queries/:id/ancestors/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Create environments warehouse saved queries cancel

Cancel a running saved query workflow.

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

POST /api/environments/:project_id/warehouse_saved_queries/:id/cancel
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/environments/:project_id/warehouse_saved_queries/:id/cancel/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Create environments warehouse saved queries cancel

Cancel a running saved query workflow.

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • deleted
    boolean
  • name
    string
  • query

    HogQL query

  • edited_history_id
    string
  • soft_update
    boolean

Response


Example request

POST /api/environments/:project_id/warehouse_saved_queries/:id/cancel
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/environments/:project_id/warehouse_saved_queries/:id/cancel/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Retrieve environments warehouse saved queries dependencies

Return the count of immediate upstream and downstream dependencies for this saved query.

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}

Retrieve environments warehouse saved queries dependencies

Return the count of immediate upstream and downstream dependencies for this saved query.

Path parameters

  • id
    string

    A UUID string identifying this data warehouse saved query.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"query": null,
"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": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"sync_frequency": "string",
"columns": "string",
"status": "Cancelled",
"last_run_at": "2019-08-24T14:15:22Z",
"managed_viewset_kind": "string",
"latest_error": "string",
"edited_history_id": "string",
"latest_history_id": "string",
"soft_update": true,
"is_materialized": true
}
Next page →

Community questions

Questions about this page? or post a community question.