Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(data-warehouse): add a warehouse destinations scene (#90145)

Tom Owers790079905729
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 2f10d263b9da..325ea969e0ad 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -2428,6 +2428,22 @@ snapshots:
hash: v1.k794b7964.2ff7288bc0a83e48485c4bd195b0cbceb06d5fd2218264cf63c49a72a90f00dd.tsDphOLaTwWpwAxmLc9dw4zQw9og1WJG5vjOGij2UeE
data-warehouse-query-history-modal--with-history--light:
hash: v1.k794b7964.e72700e47a962bf542a5cb857bc6bd98e4d0ca8e280db1ce01c144d3d1b818ef.naPm1iXreZerb2g6MdHDraZEtV7nGY8bi_60zMzf70s
+ data-warehouse-warehousedestinationstable--default--dark:
+ hash: v1.k794b7964.1a04adf977ed41fb4adcf77bafd5fae4ee839aee3b23a1cc27dacb3d5b15eb81.eG5JEF8q1iEVBz5z2p2nfnBDgLMabiBLlUtTnzH6K9Q
+ data-warehouse-warehousedestinationstable--default--light:
+ hash: v1.k794b7964.83464c3cc83d0c24582e9dd5d3e67b3799195b435d80540fd9e56bf104ee2f14.K-hPhqPaWCr4n8br1e5sf4Ul6AdfFPi7zuHuT-fXvYc
+ data-warehouse-warehousedestinationstable--deleting--dark:
+ hash: v1.k794b7964.1a04adf977ed41fb4adcf77bafd5fae4ee839aee3b23a1cc27dacb3d5b15eb81.zpeJlWbYFzd8flyum4CUM_B-O3CakOPgnyI6MRb7BNY
+ data-warehouse-warehousedestinationstable--deleting--light:
+ hash: v1.k794b7964.83464c3cc83d0c24582e9dd5d3e67b3799195b435d80540fd9e56bf104ee2f14.F0p-t8XeRtUpFWDU7FcuMnPvEF7wDzie9nKgAEUFd7w
+ data-warehouse-warehousedestinationstable--empty--dark:
+ hash: v1.k794b7964.9f1bf33e217cec7392aabfd90b22f1b90d23c376fe23fd3da26da296bd2a3bed.vr1sLFpw_5xjzCc0k0Y0O4rgmSzSJt1fymgjYnzfs1M
+ data-warehouse-warehousedestinationstable--empty--light:
+ hash: v1.k794b7964.fbf426283f3c515b35f5b1a1d83bbd80527692b393d1b415e83070e2fb525077.kx3a5CnOGxV-4p6vGDHRT1z1wGNOdijZQKO-vQKmovo
+ data-warehouse-warehousedestinationstable--loading--dark:
+ hash: v1.k794b7964.6822b2603856380f898ef83e31d6bb3a179ef78e97dce603804d61e536e33543.jdFqJsjhfMQIUySpfQ_Dvwca7kdb_1jRS9j5U5OmIDY
+ data-warehouse-warehousedestinationstable--loading--light:
+ hash: v1.k794b7964.b5aaffa7f7e755ef371931ba26506118e66221071eacbcb8d96df4a8d1fda234.KvSLPPOYhqF6fjKn-ZV23joNGS5B-4jwxfaff2cyP7I
endpoints-usagetrendschart--breakdown--dark:
hash: v1.k794b7964.725cd338f4c7922dc0defc35db0438ca80cd1fcec083b52cae4a3fce1be90235.fSfMnv_kEKzqwV0o4HdZA5W2pAUvXeiW-1fDQjjEu_w
endpoints-usagetrendschart--breakdown--light:
diff --git a/frontend/src/productScenes.tsx b/frontend/src/productScenes.tsx
index f0a08f7e6498..514080ac45a8 100644
--- a/frontend/src/productScenes.tsx
+++ b/frontend/src/productScenes.tsx
@@ -71,6 +71,8 @@ export const productScenes: Record<string, () => Promise<any>> = {
DataWarehouseSourceConnect: () =>
import('../../products/data_warehouse/frontend/scenes/SourceConnectScene/SourceConnectScene'),
DataWarehouseSourceSchema: () => import('../../products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene'),
+ WarehouseDestinations: () =>
+ import('../../products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsScene'),
EarlyAccessFeatures: () => import('../../products/early_access_features/frontend/EarlyAccessFeatures'),
EarlyAccessFeature: () => import('../../products/early_access_features/frontend/EarlyAccessFeature'),
EndpointsScene: () => import('../../products/endpoints/frontend/EndpointsScene'),
diff --git a/frontend/src/products.json b/frontend/src/products.json
index 2d77b97c6697..3ace2865cc3b 100644
--- a/frontend/src/products.json
+++ b/frontend/src/products.json
@@ -330,6 +330,13 @@
"intents": []
},
{ "path": "Models", "category": "Tools", "iconType": "sql_editor", "type": "sql", "intents": [] },
+ {
+ "path": "Warehouse destinations",
+ "category": "Pipeline",
+ "iconType": "data_warehouse",
+ "type": null,
+ "intents": []
+ },
{
"path": "Managed viewsets",
"category": "Unreleased",
diff --git a/frontend/src/products.tsx b/frontend/src/products.tsx
index 096798daadb8..959f6fac1bf5 100644
--- a/frontend/src/products.tsx
+++ b/frontend/src/products.tsx
@@ -141,6 +141,7 @@ export const productRoutes: Record<string, [string, string]> = {
'DataWarehouseSourceSchema',
'dataWarehouseSourceSchema',
],
+ '/data-management/warehouse-destinations': ['WarehouseDestinations', 'warehouseDestinations'],
'/data-management/sources/:id/:tab': ['DataWarehouseSource', 'dataWarehouseSource'],
'/data-warehouse/new-source': ['DataWarehouseSourceNew', 'dataWarehouseSourceNew'],
'/data-warehouse/connect': ['DataWarehouseSourceConnect', 'dataWarehouseSourceConnect'],
@@ -688,6 +689,12 @@ export const productConfiguration: Record<string, any> = {
DataWarehouseSourceNew: { projectBased: true, name: 'New data warehouse source' },
DataWarehouseSourceConnect: { projectBased: true, name: 'Connect data warehouse source' },
DataWarehouseSourceSchema: { projectBased: true, name: 'Data warehouse schema' },
+ WarehouseDestinations: {
+ projectBased: true,
+ name: 'Warehouse destinations',
+ description: 'Manage where your warehouse sources write the rows they sync.',
+ iconType: 'data_warehouse',
+ },
EarlyAccessFeatures: {
name: 'Early access features',
projectBased: true,
@@ -1255,6 +1262,7 @@ export const productUrls = {
const queryString = params.toString()
return `/data-warehouse/new-source${queryString ? `?${queryString}` : ''}`
},
+ warehouseDestinations: (): string => '/data-management/warehouse-destinations',
dataWarehouseSourceConnect: (kind?: string): string =>
`/data-warehouse/connect${kind ? `?kind=${encodeURIComponent(kind)}` : ''}`,
earlyAccessFeatures: (): string => '/early_access_features',
@@ -2147,6 +2155,7 @@ export const getTreeItemsProducts = (): FileSystemImport[] => [
'DataWarehouseSourceNew',
'DataWarehouseSourceConnect',
'DataWarehouseSourceSchema',
+ 'WarehouseDestinations',
],
},
{
@@ -2876,6 +2885,7 @@ export const getTreeItemsMetadata = (): FileSystemImport[] => [
'DataWarehouseSourceNew',
'DataWarehouseSourceConnect',
'DataWarehouseSourceSchema',
+ 'WarehouseDestinations',
],
},
{
@@ -2931,6 +2941,15 @@ export const getTreeItemsMetadata = (): FileSystemImport[] => [
sceneKey: 'Transformations',
sceneKeys: ['Transformations'],
},
+ {
+ path: 'Warehouse destinations',
+ category: 'Pipeline',
+ iconType: 'data_warehouse',
+ href: urls.warehouseDestinations(),
+ flag: FEATURE_FLAGS.WAREHOUSE_MULTI_DESTINATION,
+ sceneKey: 'WarehouseDestinations',
+ sceneKeys: ['WarehouseDestinations'],
+ },
{
path: 'Warehouse properties',
category: 'Schema',
diff --git a/frontend/src/scenes/sceneTypes.ts b/frontend/src/scenes/sceneTypes.ts
index fd4ee87b73de..2fc25e4d0418 100644
--- a/frontend/src/scenes/sceneTypes.ts
+++ b/frontend/src/scenes/sceneTypes.ts
@@ -196,6 +196,7 @@ export enum Scene {
VercelConnect = 'VercelConnect',
VercelLinkError = 'VercelLinkError',
VerifyEmail = 'VerifyEmail',
+ WarehouseDestinations = 'WarehouseDestinations',
WarehouseProperties = 'WarehouseProperties',
WebAnalytics = 'WebAnalytics',
WebAnalyticsPageReports = 'WebAnalyticsPageReports',
diff --git a/products/data_warehouse/frontend/scenes/SourceScene/tabs/DestinationsTab.tsx b/products/data_warehouse/frontend/scenes/SourceScene/tabs/DestinationsTab.tsx
index 4d72e95143d7..af4245c3d018 100644
--- a/products/data_warehouse/frontend/scenes/SourceScene/tabs/DestinationsTab.tsx
+++ b/products/data_warehouse/frontend/scenes/SourceScene/tabs/DestinationsTab.tsx
@@ -1,7 +1,9 @@
import { useActions, useValues } from 'kea'
import { IconPlusSmall } from '@posthog/icons'
-import { LemonButton } from '@posthog/lemon-ui'
+import { LemonButton, Link } from '@posthog/lemon-ui'
+
+import { urls } from 'scenes/urls'
import { DestinationList } from 'products/data_warehouse/frontend/shared/components/DestinationList'
import { DestinationModal } from 'products/data_warehouse/frontend/shared/components/DestinationModal'
@@ -41,7 +43,11 @@ export function DestinationsTab({ id }: DestinationsTabProps): JSX.Element {
<div className="flex gap-2 items-start justify-between">
<p className="max-w-prose">
Every table on this source syncs to the destinations turned on here. A table with its own
- destinations ignores this list.
+ destinations ignores this list. To rename or delete a destination, go to{' '}
+ <Link to={urls.warehouseDestinations()} data-attr="warehouse-destinations-manage-link">
+ Warehouse destinations
+ </Link>
+ .
</p>
<LemonButton
type="secondary"
diff --git a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/SyncedSources.tsx b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/SyncedSources.tsx
new file mode 100644
index 000000000000..e86651116429
--- /dev/null
+++ b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/SyncedSources.tsx
@@ -0,0 +1,48 @@
+import { LemonTag, Link, Tooltip } from '@posthog/lemon-ui'
+
+import { urls } from 'scenes/urls'
+
+import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
+
+// Enough names to see what a destination serves at a glance; the rest go behind a count, so one
+// destination shared by dozens of sources does not push every other row off the screen.
+const NAMES_SHOWN = 3
+
+export interface SyncedSourcesProps {
+ destination: ExternalDataDestinationApi
+}
+
+export function SyncedSources({ destination }: SyncedSourcesProps): JSX.Element {
+ const sources = destination.synced_sources ?? []
+
+ if (sources.length === 0) {
+ return <span className="text-muted">Nothing yet</span>
+ }
+
+ const shown = sources.slice(0, NAMES_SHOWN)
+ const hidden = sources.slice(NAMES_SHOWN)
+
+ return (
+ <div className="flex flex-wrap gap-1 items-center">
+ {shown.map((source) => (
+ <Tooltip
+ key={source.id}
+ title={
+ source.via_table_override
+ ? 'Only some of this source’s tables sync here, through their own destinations'
+ : 'Every table on this source syncs here'
+ }
+ >
+ <Link to={urls.dataWarehouseSource(source.id, 'destinations')}>
+ <LemonTag type={source.via_table_override ? 'muted' : 'default'}>{source.name}</LemonTag>
+ </Link>
+ </Tooltip>
+ ))}
+ {hidden.length > 0 && (
+ <Tooltip title={hidden.map((source) => source.name).join(', ')}>
+ <span className="text-muted text-xs">and {hidden.length} more</span>
+ </Tooltip>
+ )}
+ </div>
+ )
+}
diff --git a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsScene.tsx b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsScene.tsx
new file mode 100644
index 000000000000..eed688340bb8
--- /dev/null
+++ b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsScene.tsx
@@ -0,0 +1,96 @@
+import { useActions, useValues } from 'kea'
+
+import { IconPlusSmall } from '@posthog/icons'
+import { LemonBanner, LemonButton, Link } from '@posthog/lemon-ui'
+
+import { NotFound } from 'lib/components/NotFound'
+import { FEATURE_FLAGS } from 'lib/constants'
+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
+import { SceneExport } from 'scenes/sceneTypes'
+import { urls } from 'scenes/urls'
+
+import { SceneContent } from '~/layout/scenes/components/SceneContent'
+import { SceneTitleSection } from '~/layout/scenes/components/SceneTitleSection'
+
+import { DestinationModal } from '../../shared/components/DestinationModal'
+import { destinationModalLogic } from '../../shared/logics/destinationModalLogic'
+import { warehouseDestinationsSceneLogic } from './warehouseDestinationsSceneLogic'
+import { WarehouseDestinationsTable } from './WarehouseDestinationsTable'
+
+const MODAL_KEY = 'warehouse-destinations-scene'
+
+export const scene: SceneExport = {
+ component: WarehouseDestinationsScene,
+ logic: warehouseDestinationsSceneLogic,
+}
+
+export function WarehouseDestinationsScene(): JSX.Element {
+ const { featureFlags } = useValues(featureFlagLogic)
+ const { destinations, destinationsLoading, loadError, deletingId } = useValues(warehouseDestinationsSceneLogic)
+ const { loadDestinations, deleteDestination } = useActions(warehouseDestinationsSceneLogic)
+
+ const modalProps = { modalKey: MODAL_KEY, onSaved: () => loadDestinations() }
+ const { openForCreate, openForEdit } = useActions(destinationModalLogic(modalProps))
+
+ if (!featureFlags[FEATURE_FLAGS.WAREHOUSE_MULTI_DESTINATION]) {
+ return <NotFound object="page" caption="Warehouse destinations isn't available for this project yet." />
+ }
+
+ const newDestinationButton = (
+ <LemonButton
+ type="primary"
+ size="small"
+ icon={<IconPlusSmall />}
+ onClick={openForCreate}
+ data-attr="warehouse-destinations-scene-new"
+ >
+ New destination
+ </LemonButton>
+ )
+
+ return (
+ <SceneContent>
+ <SceneTitleSection
+ name="Warehouse destinations"
+ description="Destinations are where your warehouse sources write the rows they sync. Pick which ones a source or a single table uses from that source's Destinations tab."
+ resourceType={{ type: 'data_warehouse' }}
+ actions={newDestinationButton}
+ />
+
+ {loadError ? (
+ <LemonBanner
+ type="error"
+ action={{
+ children: 'Try again',
+ onClick: loadDestinations,
+ loading: destinationsLoading,
+ 'data-attr': 'warehouse-destinations-scene-retry',
+ }}
+ >
+ {loadError}
+ </LemonBanner>
+ ) : (
+ <WarehouseDestinationsTable
+ destinations={destinations ?? []}
+ loading={destinationsLoading || destinations === null}
+ onEdit={openForEdit}
+ onDelete={deleteDestination}
+ deletingId={deletingId}
+ emptyState={
+ <div className="flex flex-col gap-2 items-center py-4">
+ <span>
+ No destinations yet. Your sources write to the PostHog warehouse until you add one.
+ </span>
+ <span className="text-muted">
+ Add a destination here, then turn it on from a <Link to={urls.sources()}>source</Link>.
+ </span>
+ {newDestinationButton}
+ </div>
+ }
+ />
+ )}
+
+ <DestinationModal {...modalProps} />
+ </SceneContent>
+ )
+}
diff --git a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.stories.tsx b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.stories.tsx
new file mode 100644
index 000000000000..8b0139e56dc0
--- /dev/null
+++ b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.stories.tsx
@@ -0,0 +1,74 @@
+import { Meta, StoryFn } from '@storybook/react'
+
+import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
+
+import { WarehouseDestinationsTable, WarehouseDestinationsTableProps } from './WarehouseDestinationsTable'
+
+const WAREHOUSE: ExternalDataDestinationApi = {
+ id: '01a03e9c-1b76-0000-9079-2a0ee2186dea',
+ type: 'PostHogWarehouse',
+ name: 'PostHog warehouse',
+ config: {},
+ integration: null,
+ is_posthog_warehouse: true,
+ created_at: '2026-08-20T10:00:00Z',
+ updated_at: '2026-08-25T10:00:00Z',
+ created_by: null,
+} as ExternalDataDestinationApi
+
+const POSTGRES: ExternalDataDestinationApi = {
+ id: '01a03e9c-1b7c-0000-71ce-5e5d7b04df8f',
+ type: 'Postgres',
+ name: 'Customer Postgres',
+ config: { database: 'analytics', schema: 'customer_sync' },
+ integration: 1,
+ is_posthog_warehouse: false,
+ created_at: '2026-08-24T10:00:00Z',
+ updated_at: '2026-08-26T14:00:00Z',
+ created_by: null,
+} as ExternalDataDestinationApi
+
+const meta: Meta<typeof WarehouseDestinationsTable> = {
+ title: 'Data Warehouse/WarehouseDestinationsTable',
+ component: WarehouseDestinationsTable,
+ tags: ['autodocs'],
+}
+export default meta
+
+const Template: StoryFn<typeof WarehouseDestinationsTable> = (props: WarehouseDestinationsTableProps) => (
+ <WarehouseDestinationsTable {...props} />
+)
+
+export const Default = Template.bind({})
+Default.args = {
+ destinations: [POSTGRES, WAREHOUSE],
+ loading: false,
+ onEdit: () => {},
+ onDelete: () => {},
+}
+
+// The PostHog warehouse row is managed, so both of its actions stay disabled.
+export const Deleting = Template.bind({})
+Deleting.args = {
+ ...Default.args,
+ deletingId: POSTGRES.id,
+}
+
+export const Loading = Template.bind({})
+Loading.args = {
+ ...Default.args,
+ destinations: [],
+ loading: true,
+}
+Loading.parameters = {
+ // This story shows a permanent loading state by design, so the test runner must not
+ // wait for the loader to disappear before taking its snapshot.
+ testOptions: { waitForLoadersToDisappear: false },
+}
+
+export const Empty = Template.bind({})
+Empty.args = {
+ ...Default.args,
+ destinations: [],
+ emptyState: 'No destinations yet. Your sources write to the PostHog warehouse until you add one.',
+}
diff --git a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsx b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsx
new file mode 100644
index 000000000000..437f15274ef5
--- /dev/null
+++ b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsTable.tsx
@@ -0,0 +1,121 @@
+import type { ReactNode } from 'react'
+
+import { IconPencil, IconTrash } from '@posthog/icons'
+import { LemonButton, LemonTable, LemonTableColumn, LemonTag } from '@posthog/lemon-ui'
+
+import { More } from 'lib/lemon-ui/LemonButton/More'
+import { updatedAtColumn } from 'lib/lemon-ui/LemonTable/columnUtils'
+
+import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
+
+import { DestinationIcon, destinationTypeLabel } from '../../shared/components/DestinationIcon'
+import { destinationTarget } from '../../shared/components/destinationTarget'
+import { SyncedSources } from './SyncedSources'
+
+const MANAGED_REASON = 'The PostHog warehouse is managed for you'
+
+export interface WarehouseDestinationsTableProps {
+ destinations: ExternalDataDestinationApi[]
+ loading: boolean
+ onEdit: (destination: ExternalDataDestinationApi) => void
+ onDelete: (destination: ExternalDataDestinationApi) => void
+ /** The destination currently being deleted, so its row cannot fire a second request. */
+ deletingId?: string | null
+ /** Rendered when the list has loaded and holds nothing. */
+ emptyState?: ReactNode
+}
+
+export function WarehouseDestinationsTable({
+ destinations,
+ loading,
+ onEdit,
+ onDelete,
+ deletingId,
+ emptyState,
+}: WarehouseDestinationsTableProps): JSX.Element {
+ const columns: LemonTableColumn<ExternalDataDestinationApi, any>[] = [
+ {
+ title: '',
+ key: 'icon',
+ width: 0,
+ render: (_, destination) => <DestinationIcon type={destination.type} />,
+ },
+ {
+ title: 'Name',
+ key: 'name',
+ sorter: (a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base', numeric: true }),
+ render: (_, destination) => (
+ <div className="flex flex-col">
+ <span className="font-semibold">{destination.name}</span>
+ {destinationTarget(destination) ? (
+ <span className="text-muted text-xs">{destinationTarget(destination)}</span>
+ ) : null}
+ </div>
+ ),
+ },
+ {
+ title: 'Type',
+ key: 'type',
+ render: (_, destination) => (
+ <LemonTag type={destination.is_posthog_warehouse ? 'highlight' : 'default'}>
+ {destinationTypeLabel(destination.type)}
+ </LemonTag>
+ ),
+ },
+ {
+ title: 'Synced by',
+ key: 'synced_sources',
+ render: (_, destination) => <SyncedSources destination={destination} />,
+ },
+ updatedAtColumn() as LemonTableColumn<ExternalDataDestinationApi, any>,
+ {
+ title: '',
+ key: 'actions',
+ width: 0,
+ render: (_, destination) => {
+ const managedReason = destination.is_posthog_warehouse ? MANAGED_REASON : undefined
+ return (
+ <More
+ overlay={
+ <>
+ <LemonButton
+ fullWidth
+ icon={<IconPencil />}
+ onClick={() => onEdit(destination)}
+ data-attr="warehouse-destination-scene-edit"
+ disabledReason={managedReason}
+ >
+ Edit
+ </LemonButton>
+ <LemonButton
+ fullWidth
+ status="danger"
+ icon={<IconTrash />}
+ onClick={() => onDelete(destination)}
+ data-attr="warehouse-destination-scene-delete"
+ disabledReason={
+ managedReason ??
+ (deletingId === destination.id ? 'Deleting this destination' : undefined)
+ }
+ >
+ Delete
+ </LemonButton>
+ </>
+ }
+ />
+ )
+ },
+ },
+ ]
+
+ return (
+ <LemonTable
+ dataSource={destinations}
+ loading={loading}
+ rowKey={(destination) => destination.id}
+ columns={columns}
+ nouns={['destination', 'destinations']}
+ emptyState={emptyState}
+ />
+ )
+}
diff --git a/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/warehouseDestinationsSceneLogic.ts b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/warehouseDestinationsSceneLogic.ts
new file mode 100644
index 000000000000..1e0558b22a75
--- /dev/null
+++ b/products/data_warehouse/frontend/scenes/WarehouseDestinationsScene/warehouseDestinationsSceneLogic.ts
@@ -0,0 +1,128 @@
+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers } from 'kea'
+import { loaders } from 'kea-loaders'
+
+import { LemonDialog } from 'lib/lemon-ui/LemonDialog'
+import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
+import { teamLogic } from 'scenes/teamLogic'
+
+import {
+ externalDataDestinationsDestroy,
+ externalDataDestinationsList,
+} from 'products/warehouse_sources/frontend/generated/api'
+import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
+
+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
+export interface warehouseDestinationsSceneLogicValues {
+ currentTeamId: number | null // teamLogic
+ deletingId: string | null
+ destinations: ExternalDataDestinationApi[] | null
+ destinationsLoading: boolean
+ loadError: string | null
+}
+
+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
+export interface warehouseDestinationsSceneLogicActions {
+ confirmDelete: (destination: ExternalDataDestinationApi) => {
+ destination: ExternalDataDestinationApi
+ }
+ deleteDestination: (destination: ExternalDataDestinationApi) => {
+ destination: ExternalDataDestinationApi
+ }
+ loadDestinations: () => any
+ loadDestinationsFailure: (
+ error: string,
+ errorObject?: any
+ ) => {
+ error: string
+ errorObject?: any
+ }
+ loadDestinationsSuccess: (
+ destinations: ExternalDataDestinationApi[],
+ payload?: any
+ ) => {
+ destinations: ExternalDataDestinationApi[]
+ payload?: any
+ }
+}
+
+export type warehouseDestinationsSceneLogicType = MakeLogicType<
+ warehouseDestinationsSceneLogicValues,
+ warehouseDestinationsSceneLogicActions
+>
+
+export const warehouseDestinationsSceneLogic = kea<warehouseDestinationsSceneLogicType>([
+ path([
+ 'products',
+ 'data_warehouse',
+ 'frontend',
+ 'scenes',
+ 'WarehouseDestinationsScene',
+ 'warehouseDestinationsSceneLogic',
+ ]),
+ connect(() => ({
+ values: [teamLogic, ['currentTeamId']],
+ })),
+ actions({
+ deleteDestination: (destination: ExternalDataDestinationApi) => ({ destination }),
+ confirmDelete: (destination: ExternalDataDestinationApi) => ({ destination }),
+ }),
+ loaders(({ values }) => ({
+ destinations: [
+ // Null, not an empty list: "this project has no destinations" is a verdict about a
+ // loaded list, and the scene shows a different screen for it than for "not loaded yet".
+ null as ExternalDataDestinationApi[] | null,
+ {
+ loadDestinations: async () => {
+ const response = await externalDataDestinationsList(String(values.currentTeamId))
+ return response.results ?? []
+ },
+ },
+ ],
+ })),
+ reducers({
+ loadError: [
+ null as string | null,
+ {
+ loadDestinations: () => null,
+ loadDestinationsSuccess: () => null,
+ loadDestinationsFailure: (_, { error }) => error || 'Could not load destinations',
+ },
+ ],
+ deletingId: [
+ null as string | null,
+ {
+ confirmDelete: (_, { destination }) => destination.id,
+ loadDestinationsSuccess: () => null,
+ loadDestinationsFailure: () => null,
+ },
+ ],
+ }),
+ listeners(({ actions, values }) => ({
+ deleteDestination: ({ destination }) => {
+ LemonDialog.open({
+ title: 'Delete this destination?',
+ description: `Deleting ${destination.name} detaches it from every source and table that syncs to it. Those tables keep syncing to their other destinations. Runs already in flight finish where they started.`,
+ primaryButton: {
+ children: 'Delete destination',
+ status: 'danger',
+ onClick: () => actions.confirmDelete(destination),
+ },
+ secondaryButton: { children: 'Cancel' },
+ })
+ },
+ confirmDelete: async ({ destination }) => {
+ try {
+ await externalDataDestinationsDestroy(String(values.currentTeamId), destination.id)
+ } catch (error: any) {
+ lemonToast.error(error?.detail || 'Could not delete this destination')
+ actions.loadDestinations()
+ return
+ }
+ lemonToast.success(`${destination.name} deleted`)
+ actions.loadDestinations()
+ },
+ })),
+ afterMount(({ actions }) => {
+ actions.loadDestinations()
+ }),
+])
diff --git a/products/data_warehouse/frontend/shared/components/DestinationList.tsx b/products/data_warehouse/frontend/shared/components/DestinationList.tsx
index c3c5d3d86eee..9e0062ba5a99 100644
--- a/products/data_warehouse/frontend/shared/components/DestinationList.tsx
+++ b/products/data_warehouse/frontend/shared/components/DestinationList.tsx
@@ -7,18 +7,7 @@ import { DATA_WAREHOUSE_APP_SOURCE } from 'products/data_warehouse/frontend/shar
import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
import { DestinationIcon, destinationTypeLabel } from './DestinationIcon'
-
-/** Where a destination writes, as far as its non-secret config says. Null when there is nothing to add. */
-export function destinationTarget(destination: ExternalDataDestinationApi): string | null {
- if (destination.is_posthog_warehouse) {
- return 'Managed by PostHog'
- }
- const config = (destination.config ?? {}) as Record<string, unknown>
- const parts = [config.database, config.schema, config.dataset, config.bucket].filter(
- (part): part is string => typeof part === 'string' && part.length > 0
- )
- return parts.length > 0 ? parts.join('.') : null
-}
+import { destinationTarget } from './destinationTarget'
export interface DestinationListProps {
destinations: ExternalDataDestinationApi[]
diff --git a/products/data_warehouse/frontend/shared/components/JobDestinations.tsx b/products/data_warehouse/frontend/shared/components/JobDestinations.tsx
index 1299d3284763..b1eacbfb2502 100644
--- a/products/data_warehouse/frontend/shared/components/JobDestinations.tsx
+++ b/products/data_warehouse/frontend/shared/components/JobDestinations.tsx
@@ -3,7 +3,7 @@ import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
import { DESTINATION_ICON_MAP, destinationTypeLabel } from './DestinationIcon'
-import { destinationTarget } from './DestinationList'
+import { destinationTarget } from './destinationTarget'
export interface JobDestinationsProps {
/** Snapshotted on the run when it started. Empty on runs that predate destinations. */
diff --git a/products/data_warehouse/frontend/shared/components/destinationTarget.ts b/products/data_warehouse/frontend/shared/components/destinationTarget.ts
new file mode 100644
index 000000000000..eb2eb14d48b9
--- /dev/null
+++ b/products/data_warehouse/frontend/shared/components/destinationTarget.ts
@@ -0,0 +1,13 @@
+import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
+
+/** Where a destination writes, as far as its non-secret config says. Null when there is nothing to add. */
+export function destinationTarget(destination: ExternalDataDestinationApi): string | null {
+ if (destination.is_posthog_warehouse) {
+ return 'Managed by PostHog'
+ }
+ const config = (destination.config ?? {}) as Record<string, unknown>
+ const parts = [config.database, config.schema, config.dataset, config.bucket].filter(
+ (part): part is string => typeof part === 'string' && part.length > 0
+ )
+ return parts.length > 0 ? parts.join('.') : null
+}
diff --git a/products/data_warehouse/frontend/shared/components/metrics/DestinationMetricSummary.tsx b/products/data_warehouse/frontend/shared/components/metrics/DestinationMetricSummary.tsx
index 14037455453b..311afcf31012 100644
--- a/products/data_warehouse/frontend/shared/components/metrics/DestinationMetricSummary.tsx
+++ b/products/data_warehouse/frontend/shared/components/metrics/DestinationMetricSummary.tsx
@@ -4,7 +4,7 @@ import { getColorVar } from 'lib/colors'
import { appMetricsLogic } from 'lib/components/AppMetrics/appMetricsLogic'
import { AppMetricSummary } from 'lib/components/AppMetrics/AppMetricSummary'
-import { destinationTarget } from 'products/data_warehouse/frontend/shared/components/DestinationList'
+import { destinationTarget } from 'products/data_warehouse/frontend/shared/components/destinationTarget'
import { ExternalDataDestinationApi } from 'products/warehouse_sources/frontend/generated/api.schemas'
import { DATA_WAREHOUSE_APP_SOURCE } from './DataWarehouseMetrics'
diff --git a/products/data_warehouse/manifest.tsx b/products/data_warehouse/manifest.tsx
index 20656460b82c..bf483af1a065 100644
--- a/products/data_warehouse/manifest.tsx
+++ b/products/data_warehouse/manifest.tsx
@@ -70,6 +70,13 @@ export const manifest: ProductManifest = {
projectBased: true,
name: 'Data warehouse schema',
},
+ WarehouseDestinations: {
+ import: () => import('./frontend/scenes/WarehouseDestinationsScene/WarehouseDestinationsScene'),
+ projectBased: true,
+ name: 'Warehouse destinations',
+ description: 'Manage where your warehouse sources write the rows they sync.',
+ iconType: 'data_warehouse',
+ },
},
routes: {
'/data-ops': ['DataOps', 'dataOps'],
@@ -89,6 +96,7 @@ export const manifest: ProductManifest = {
'DataWarehouseSourceSchema',
'dataWarehouseSourceSchema',
],
+ '/data-management/warehouse-destinations': ['WarehouseDestinations', 'warehouseDestinations'],
'/data-management/sources/:id/:tab': ['DataWarehouseSource', 'dataWarehouseSource'],
'/data-warehouse/new-source': ['DataWarehouseSourceNew', 'dataWarehouseSourceNew'],
'/data-warehouse/connect': ['DataWarehouseSourceConnect', 'dataWarehouseSourceConnect'],
@@ -152,6 +160,7 @@ export const manifest: ProductManifest = {
const queryString = params.toString()
return `/data-warehouse/new-source${queryString ? `?${queryString}` : ''}`
},
+ warehouseDestinations: (): string => '/data-management/warehouse-destinations',
dataWarehouseSourceConnect: (kind?: string): string =>
`/data-warehouse/connect${kind ? `?kind=${encodeURIComponent(kind)}` : ''}`,
},
@@ -199,6 +208,15 @@ export const manifest: ProductManifest = {
sceneKey: 'Models',
sceneKeys: ['Models'],
},
+ {
+ path: 'Warehouse destinations',
+ category: 'Pipeline',
+ iconType: 'data_warehouse',
+ href: urls.warehouseDestinations(),
+ flag: FEATURE_FLAGS.WAREHOUSE_MULTI_DESTINATION,
+ sceneKey: 'WarehouseDestinations',
+ sceneKeys: ['WarehouseDestinations'],
+ },
{
path: 'Managed viewsets',
category: 'Unreleased',
diff --git a/products/warehouse_sources/backend/presentation/views/external_data_destination.py b/products/warehouse_sources/backend/presentation/views/external_data_destination.py
index 976c7c5e4356..e1a8dc825239 100644
--- a/products/warehouse_sources/backend/presentation/views/external_data_destination.py
+++ b/products/warehouse_sources/backend/presentation/views/external_data_destination.py
@@ -1,8 +1,9 @@
-from typing import Any, cast
+from typing import Any, Optional, cast
from django.db import transaction
from django.db.models import Q
+from drf_spectacular.utils import extend_schema_field
from rest_framework import serializers, status, viewsets
from rest_framework.exceptions import PermissionDenied, ValidationError
from rest_framework.request import Request
@@ -14,7 +15,11 @@ from posthog.models.integration import Integration
from posthog.permissions import is_service_auth
from products.access_control.backend.facade.user_access_control import access_level_satisfied_for_resource
-from products.warehouse_sources.backend.facade.models import ExternalDataDestination, ExternalDataSchema
+from products.warehouse_sources.backend.facade.models import (
+ ExternalDataDestination,
+ ExternalDataSchema,
+ ExternalDataSource,
+)
# Which Integration kind holds the credentials for each destination type. A type absent from
# this map needs no integration; the PostHog warehouse is the only such type today.
@@ -40,6 +45,27 @@ DESTINATION_INTEGRATION_KINDS: dict[str, tuple[str, ...]] = {
USER_CREATABLE_TYPES = frozenset(DESTINATION_INTEGRATION_KINDS)
+class SyncedSourceSerializer(serializers.Serializer):
+ """One source that writes to a destination. Shape only — never used to deserialize."""
+
+ id = serializers.UUIDField(help_text="The source's id.")
+ name = serializers.CharField(help_text="How the source is labelled in the UI, prefix included.")
+ source_type = serializers.CharField(help_text="Which connector this is, e.g. Stripe or Postgres.")
+ via_table_override = serializers.BooleanField(
+ help_text="True when only some of the source's tables reach this destination, through their own override."
+ )
+
+
+def _source_summary(source: ExternalDataSource, *, via_table_override: bool = False) -> dict[str, Any]:
+ # Prefix is part of how a person recognizes a source, since one connector can be added twice.
+ return {
+ "id": str(source.id),
+ "name": f"{source.prefix or ''}{source.source_type}".strip(),
+ "source_type": source.source_type,
+ "via_table_override": via_table_override,
+ }
+
+
class ExternalDataDestinationSerializer(serializers.ModelSerializer):
type = serializers.ChoiceField(
choices=ExternalDataDestination.Type.choices,
@@ -64,6 +90,51 @@ class ExternalDataDestinationSerializer(serializers.ModelSerializer):
is_posthog_warehouse = serializers.BooleanField(
read_only=True, help_text="Whether this is the managed PostHog warehouse destination."
)
+ synced_sources = serializers.SerializerMethodField(
+ help_text=(
+ "Sources whose tables sync to this destination, so you can see what a change or a "
+ "deletion would affect. Includes sources that reach it through a single table's "
+ "override, and — for the PostHog warehouse — sources that write there by default "
+ "because nothing else was configured."
+ )
+ )
+
+ @extend_schema_field(SyncedSourceSerializer(many=True))
+ def get_synced_sources(self, destination: ExternalDataDestination) -> list[dict[str, Any]]:
+ # Reads only prefetched relations plus lists built once per request, so a project with
+ # many destinations still costs a fixed number of queries.
+ #
+ # `accessible_source_ids` is None for service auth (nothing to restrict) and otherwise the
+ # set of sources the requesting user may see — the same check the source list endpoint
+ # itself enforces. Without it, a source with an explicit `none` grant would still leak its
+ # id/name/type here just because it shares a destination with a source the user can see.
+ accessible_source_ids = self.context.get("accessible_source_ids")
+
+ def _visible(source_id: Any) -> bool:
+ return accessible_source_ids is None or str(source_id) in accessible_source_ids
+
+ by_id: dict[str, dict[str, Any]] = {}
+ for link in destination.source_links.all():
+ if link.enabled and not link.source.deleted and _visible(link.source_id):
+ by_id[str(link.source_id)] = _source_summary(link.source)
+ for schema_link in destination.schema_links.all():
+ if (
+ schema_link.enabled
+ and not schema_link.schema.deleted
+ and not schema_link.schema.source.deleted
+ and _visible(schema_link.schema.source_id)
+ ):
+ by_id.setdefault(
+ str(schema_link.schema.source_id),
+ _source_summary(schema_link.schema.source, via_table_override=True),
+ )
+
+ if destination.is_posthog_warehouse:
+ for source in self.context.get("unconfigured_sources", []):
+ if _visible(source.id):
+ by_id.setdefault(str(source.id), _source_summary(source))
+
+ return sorted(by_id.values(), key=lambda entry: entry["name"])
class Meta:
model = ExternalDataDestination
@@ -77,8 +148,9 @@ class ExternalDataDestinationSerializer(serializers.ModelSerializer):
"created_at",
"created_by",
"updated_at",
+ "synced_sources",
]
- read_only_fields = ["id", "is_posthog_warehouse", "created_at", "created_by", "updated_at"]
+ read_only_fields = ["id", "is_posthog_warehouse", "created_at", "created_by", "updated_at", "synced_sources"]
def validate(self, attrs: dict[str, Any]) -> dict[str, Any]:
destination_type = attrs.get("type", getattr(self.instance, "type", None))
@@ -174,7 +246,42 @@ class ExternalDataDestinationViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewS
ordering = "name"
def safely_get_queryset(self, queryset: Any) -> Any:
- return queryset.filter(team_id=self.team_id).order_by(self.ordering)
+ # Prefetched so `synced_sources` reads relations already in memory: two extra queries for
+ # the whole page rather than two per destination.
+ return (
+ queryset.filter(team_id=self.team_id)
+ .prefetch_related("source_links__source", "schema_links__schema__source")
+ .order_by(self.ordering)
+ )
+
+ def get_serializer_context(self) -> dict[str, Any]:
+ context = super().get_serializer_context()
+ # A source with no links of its own writes to the PostHog warehouse. Resolved once per
+ # request rather than per destination, and only when the warehouse can appear in the
+ # response at all.
+ context["unconfigured_sources"] = self._unconfigured_sources()
+ context["accessible_source_ids"] = self._accessible_source_ids()
+ return context
+
+ def _accessible_source_ids(self) -> Optional[set[str]]:
+ # None means "don't restrict": service auth acts on behalf of the system, not a project
+ # member, so there is no per-source grant to check.
+ if is_service_auth(self.request):
+ return None
+ accessible = self.user_access_control.filter_queryset_by_access_level(
+ ExternalDataSource.objects.filter(team_id=self.team_id).exclude(deleted=True),
+ resource="external_data_source",
+ )
+ return {str(source_id) for source_id in accessible.values_list("id", flat=True)}
+
+ def _unconfigured_sources(self) -> list[ExternalDataSource]:
+ return list(
+ ExternalDataSource.objects.filter(team_id=self.team_id)
+ .exclude(deleted=True)
+ .exclude(destination_links__enabled=True)
+ .exclude(schemas__destination_links__enabled=True)
+ .distinct()
+ )
def _assert_can_mutate(self, instance: ExternalDataDestination) -> None:
"""Per-table gate for changing or deleting a shared destination.
diff --git a/products/warehouse_sources/backend/tests/api/test_external_data_destination.py b/products/warehouse_sources/backend/tests/api/test_external_data_destination.py
index 5f355c6dfad1..5f415c3bde7f 100644
--- a/products/warehouse_sources/backend/tests/api/test_external_data_destination.py
+++ b/products/warehouse_sources/backend/tests/api/test_external_data_destination.py
@@ -1,15 +1,23 @@
+import pytest
from posthog.test.base import APIBaseTest
from unittest.mock import patch
+from django.db import connection
+from django.test.utils import CaptureQueriesContext
+
from rest_framework import status
from rest_framework.exceptions import PermissionDenied
+from posthog.constants import AvailableFeature
from posthog.models.integration import Integration
+from posthog.models.user import User
+from products.access_control.backend.models.access_control import AccessControl
from products.warehouse_sources.backend.models.external_data_destination import (
ExternalDataDestination,
ExternalDataSchemaDestination,
ExternalDataSourceDestination,
+ get_or_create_warehouse_destination,
)
from products.warehouse_sources.backend.models.external_data_schema import ExternalDataSchema
from products.warehouse_sources.backend.models.external_data_source import ExternalDataSource
@@ -179,6 +187,164 @@ class TestExternalDataDestinationAPI(DestinationAPITestBase):
assert destination.name == "analytics postgres"
+class TestSyncedSources(DestinationAPITestBase):
+ def _listing(self) -> dict:
+ results = self.client.get(self.base).json()["results"]
+ return {row["name"]: row["synced_sources"] for row in results}
+
+ def test_a_source_linked_to_a_destination_is_listed_against_it(self) -> None:
+ destination = self._create_destination()
+ ExternalDataSourceDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, source=self.source, destination=destination
+ )
+
+ listed = self._listing()["analytics postgres"]
+
+ assert [entry["source_type"] for entry in listed] == ["Stripe"]
+ assert listed[0]["via_table_override"] is False
+
+ def test_a_source_reaching_it_only_through_one_table_is_marked_as_such(self) -> None:
+ destination = self._create_destination()
+ ExternalDataSchemaDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, schema=self.schema, destination=destination
+ )
+
+ listed = self._listing()["analytics postgres"]
+
+ assert [entry["via_table_override"] for entry in listed] == [True]
+
+ def test_a_source_nobody_configured_is_listed_against_the_posthog_warehouse(self) -> None:
+ # It has no links, but it is not syncing nowhere: it writes to the warehouse by default,
+ # so deleting or editing that destination does affect it.
+ get_or_create_warehouse_destination(self.team.pk)
+
+ listed = self._listing()["PostHog warehouse"]
+
+ assert [entry["source_type"] for entry in listed] == ["Stripe"]
+
+ def test_a_configured_source_stops_counting_against_the_warehouse(self) -> None:
+ get_or_create_warehouse_destination(self.team.pk)
+ destination = self._create_destination()
+ ExternalDataSourceDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, source=self.source, destination=destination
+ )
+
+ listed = self._listing()
+
+ assert listed["PostHog warehouse"] == []
+ assert [entry["source_type"] for entry in listed["analytics postgres"]] == ["Stripe"]
+
+ def test_a_deleted_source_is_not_listed(self) -> None:
+ destination = self._create_destination()
+ ExternalDataSourceDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, source=self.source, destination=destination
+ )
+ self.source.deleted = True
+ self.source.save(update_fields=["deleted"])
+
+ assert self._listing()["analytics postgres"] == []
+
+ def test_listing_destinations_does_not_query_per_destination(self) -> None:
+ # The point of the prefetch: adding destinations must not add queries per row, or this
+ # scene degrades as a project grows.
+ get_or_create_warehouse_destination(self.team.pk)
+ first = self._create_destination(name="one", integration=self._integration().pk)
+ ExternalDataSourceDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, source=self.source, destination=first
+ )
+
+ def count_queries() -> int:
+ with CaptureQueriesContext(connection) as captured:
+ self.client.get(self.base)
+ return len(captured)
+
+ with_two = count_queries()
+ for index in range(6):
+ self._create_destination(name=f"extra {index}", integration=self._integration().pk)
+ with_eight = count_queries()
+
+ assert with_eight == with_two
+
+
+class TestSyncedSourcesAccessControl(DestinationAPITestBase):
+ """A source blocked from a viewer must not leak its id/name/type through synced_sources
+ just because it shares a destination with a source that viewer can see."""
+
+ def setUp(self) -> None:
+ super().setUp()
+ self.organization.available_product_features = [
+ {"key": AvailableFeature.ACCESS_CONTROL, "name": AvailableFeature.ACCESS_CONTROL},
+ {"key": AvailableFeature.ROLE_BASED_ACCESS, "name": AvailableFeature.ROLE_BASED_ACCESS},
+ ]
+ self.organization.save()
+
+ self.viewer = User.objects.create_and_join(self.organization, "[email protected]", "testtest")
+ # Resource-level viewer access by default (needed just to list destinations at all —
+ # the endpoint requires it, see `requires_resource_level_access` above), plus an
+ # explicit `none` grant blocking one specific source below in each test.
+ AccessControl.objects.create(
+ team=self.team,
+ resource="external_data_source",
+ resource_id=None,
+ access_level="viewer",
+ organization_member=self.organization.memberships.get(user=self.viewer),
+ )
+
+ def test_a_source_the_viewer_cannot_see_is_omitted(self) -> None:
+ hidden_source = ExternalDataSource.objects.create(
+ team=self.team,
+ source_id="hidden",
+ connection_id="hidden-conn",
+ status="Running",
+ source_type=ExternalDataSourceType.STRIPE,
+ )
+ AccessControl.objects.create(
+ team=self.team,
+ resource="external_data_source",
+ resource_id=str(hidden_source.id),
+ access_level="none",
+ organization_member=self.organization.memberships.get(user=self.viewer),
+ )
+ destination = self._create_destination()
+ ExternalDataSourceDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, source=self.source, destination=destination
+ )
+ ExternalDataSourceDestination.objects.for_team(self.team.pk).create(
+ team_id=self.team.pk, source=hidden_source, destination=destination
+ )
+
+ self.client.force_login(self.viewer)
+ results = self.client.get(self.base).json()["results"]
+ listed = next(row for row in results if row["name"] == "analytics postgres")["synced_sources"]
+
+ assert [entry["id"] for entry in listed] == [str(self.source.id)]
+
+ def test_the_unconfigured_warehouse_source_is_omitted_when_hidden(self) -> None:
+ hidden_source = ExternalDataSource.objects.create(
+ team=self.team,
+ source_id="hidden",
+ connection_id="hidden-conn",
+ status="Running",
+ source_type=ExternalDataSourceType.STRIPE,
+ )
+ AccessControl.objects.create(
+ team=self.team,
+ resource="external_data_source",
+ resource_id=str(hidden_source.id),
+ access_level="none",
+ organization_member=self.organization.memberships.get(user=self.viewer),
+ )
+ get_or_create_warehouse_destination(self.team.pk)
+
+ self.client.force_login(self.viewer)
+ results = self.client.get(self.base).json()["results"]
+ listed = next(row for row in results if row["name"] == "PostHog warehouse")["synced_sources"]
+
+ assert [entry["id"] for entry in listed] == [str(self.source.id)]
+ assert str(hidden_source.id) not in [entry["id"] for entry in listed]
+
+
class TestDestinationLinkEndpoints(DestinationAPITestBase):
def setUp(self) -> None:
super().setUp()
diff --git a/products/warehouse_sources/frontend/generated/api.schemas.ts b/products/warehouse_sources/frontend/generated/api.schemas.ts
index 45c70d73cb95..d2de0ac3400a 100644
--- a/products/warehouse_sources/frontend/generated/api.schemas.ts
+++ b/products/warehouse_sources/frontend/generated/api.schemas.ts
@@ -31,6 +31,20 @@ export const ExternalDataDestinationTypeEnumApi = {
S3: 'S3',
} as const
+/**
+ * One source that writes to a destination. Shape only — never used to deserialize.
+ */
+export interface SyncedSourceApi {
+ /** The source's id. */
+ id: string
+ /** How the source is labelled in the UI, prefix included. */
+ name: string
+ /** Which connector this is, e.g. Stripe or Postgres. */
+ source_type: string
+ /** True when only some of the source's tables reach this destination, through their own override. */
+ via_table_override: boolean
+}
+
export interface ExternalDataDestinationApi {
readonly id: string
/** Where synced rows are written. The PostHog warehouse is managed for you, so you cannot create one here.
@@ -63,6 +77,8 @@ export interface ExternalDataDestinationApi {
readonly created_by: number | null
/** @nullable */
readonly updated_at: string | null
+ /** Sources whose tables sync to this destination, so you can see what a change or a deletion would affect. Includes sources that reach it through a single table's override, and — for the PostHog warehouse — sources that write there by default because nothing else was configured. */
+ readonly synced_sources: readonly SyncedSourceApi[]
}
export interface PaginatedExternalDataDestinationListApi {
@@ -106,6 +122,8 @@ export interface PatchedExternalDataDestinationApi {
readonly created_by?: number | null
/** @nullable */
readonly updated_at?: string | null
+ /** Sources whose tables sync to this destination, so you can see what a change or a deletion would affect. Includes sources that reach it through a single table's override, and — for the PostHog warehouse — sources that write there by default because nothing else was configured. */
+ readonly synced_sources?: readonly SyncedSourceApi[]
}
/**
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 52bac679c9f0..6848c7481ece 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -39274,6 +39274,20 @@ export namespace Schemas {
S3: 'S3',
} as const;
+ /**
+ * One source that writes to a destination. Shape only — never used to deserialize.
+ */
+ export interface SyncedSource {
+ /** The source's id. */
+ id: string;
+ /** How the source is labelled in the UI, prefix included. */
+ name: string;
+ /** Which connector this is, e.g. Stripe or Postgres. */
+ source_type: string;
+ /** True when only some of the source's tables reach this destination, through their own override. */
+ via_table_override: boolean;
+ }
+
export interface ExternalDataDestination {
readonly id: string;
/** Where synced rows are written. The PostHog warehouse is managed for you, so you cannot create one here.
@@ -39306,6 +39320,8 @@ export namespace Schemas {
readonly created_by: number | null;
/** @nullable */
readonly updated_at: string | null;
+ /** Sources whose tables sync to this destination, so you can see what a change or a deletion would affect. Includes sources that reach it through a single table's override, and — for the PostHog warehouse — sources that write there by default because nothing else was configured. */
+ readonly synced_sources: readonly SyncedSource[];
}
/**
@@ -68384,6 +68400,8 @@ export namespace Schemas {
readonly created_by?: number | null;
/** @nullable */
readonly updated_at?: string | null;
+ /** Sources whose tables sync to this destination, so you can see what a change or a deletion would affect. Includes sources that reach it through a single table's override, and — for the PostHog warehouse — sources that write there by default because nothing else was configured. */
+ readonly synced_sources?: readonly SyncedSource[];
}
/**
diff --git a/services/mcp/src/tools/links/app-url-manifest.json b/services/mcp/src/tools/links/app-url-manifest.json
index d8f365c5f277..0aeb82163561 100644
--- a/services/mcp/src/tools/links/app-url-manifest.json
+++ b/services/mcp/src/tools/links/app-url-manifest.json
@@ -1714,6 +1714,11 @@
"params": ["repoId"],
"scope": "project"
},
+ "warehouseDestinations": {
+ "template": "/data-management/warehouse-destinations",
+ "params": [],
+ "scope": "project"
+ },
"warehouseProperties": {
"template": "/data-management/warehouse-properties",
"params": [],
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json
index f18ae7a45875..7f6fd9272069 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json
@@ -13,7 +13,7 @@
"type": "object"
},
"url": {
- "description": "A path template copied verbatim from the catalog below (e.g. `/persons/{uuid}`). Its `{placeholders}` are filled from `params`. These slugs come from PostHog's canonical route table, so they are always correct — never pass a path that is not in this list.\n\n/account-connected/{kind}\n/account/credential-review\n/account/social-connected\n/activity-logs\n/activity/{tab}\n/agentic/account-mismatch\n/agentic/authorize\n/ai\n/ai-enrichment\n/ai-evals/datasets\n/ai-evals/datasets/{id}\n/ai-evals/evaluations\n/ai-evals/evaluations/offline/experiments\n/ai-evals/evaluations/offline/experiments/{experimentId}\n/ai-evals/evaluations/templates\n/ai-evals/evaluations/{id}\n/ai-evals/taggers\n/ai-evals/taggers/{id}\n/ai-gateway\n/ai-observability/clusters\n/ai-observability/clusters/{runId}/{clusterId}\n/ai-observability/dashboard\n/ai-observability/errors\n/ai-observability/generations\n/ai-observability/playground\n/ai-observability/reviews\n/ai-observability/self-driving\n/ai-observability/sentiment\n/ai-observability/sessions\n/ai-observability/sessions/{id}\n/ai-observability/tools\n/ai-observability/traces\n/ai-observability/traces/{id}\n/ai-observability/users\n/ai/history\n/alerts\n/approvals/{id}\n/billing/authorization_status\n/business-knowledge\n/business-knowledge/settings\n/business-knowledge/{id}\n/canvas\n/cli/authorize\n/cli/live\n/code-review\n/code/canvas/{channelId}/{dashboardId}\n/code/channel/{channelId}\n/code/loop/{loopId}\n/code/task/{taskId}\n/cohorts\n/cohorts/{id}\n/cohorts/{id}/calculation-history\n/connect/vercel/link\n/coupons/{campaign}\n/create-organization\n/customer_analytics\n/customer_analytics/accounts\n/customer_analytics/accounts/by-external-id/{externalId}\n/customer_analytics/accounts/{accountId}\n/customer_analytics/announcements\n/customer_analytics/configuration\n/customer_analytics/dashboard\n/customer_analytics/feature-requests\n/customer_analytics/feed\n/customer_analytics/journeys\n/customer_analytics/journeys/new\n/customer_analytics/journeys/templates\n/customer_analytics/journeys/{id}/edit\n/customer_analytics/notes\n/customer_analytics/tasks\n/dashboard\n/dashboard/templates/{templateId}/copy-to-project\n/dashboard/{id}\n/dashboard/{id}/sharing\n/dashboard/{id}/subscriptions\n/dashboard/{id}/subscriptions/{subscriptionId}\n/dashboard/{id}/tiles/{tileId}\n/data-catalog\n/data-catalog/metrics/{name}\n/data-management/actions\n/data-management/actions/new\n/data-management/actions/new/\n/data-management/actions/{id}\n/data-management/annotations\n/data-management/annotations/{id}\n/data-management/core-events\n/data-management/database\n/data-management/destinations\n/data-management/event-filtering\n/data-management/events\n/data-management/events/{id}\n/data-management/events/{id}/edit\n/data-management/history\n/data-management/ingestion-warnings\n/data-management/ingestion-warnings-v2\n/data-management/managed-viewsets\n/data-management/materialized-columns\n/data-management/properties\n/data-management/properties/{id}\n/data-management/properties/{id}/edit\n/data-management/revenue\n/data-management/schema\n/data-management/sources\n/data-management/sources/{id}/schemas\n/data-management/sources/{sourceId}/schemas/{schemaId}\n/data-management/transformations\n/data-management/variables\n/data-management/variables/{id}\n/data-management/variables/{id}/edit\n/data-management/warehouse-properties\n/data-ops\n/data-warehouse/connect\n/data-warehouse/new-source\n/debug\n/debug/hog\n/early_access_features\n/early_access_features/{id}\n/embedded/{token}\n/endpoints\n/endpoints/{name}\n/engineering-analytics/authors/{handle}\n/engineering-analytics/health\n/engineering-analytics/overview\n/engineering-analytics/pull-requests\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/runs/{runId}\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/workflows/{workflowName}\n/engineering-analytics/repos/{repoOwner}/{repoName}/pull-requests/{number}\n/engineering-analytics/teams\n/engineering-analytics/teams/{ownerTeam}\n/engineering-analytics/test-health\n/engineering-analytics/workflows\n/error_tracking\n/error_tracking/alerts/new/{templateId}\n/error_tracking/alerts/{id}\n/error_tracking/fingerprint/{fingerprint}\n/error_tracking/{id}\n/events/{id}/{timestamp}\n/experiments\n/experiments/shared-metrics\n/experiments/shared-metrics/{id}\n/experiments/staff\n/experiments/{id}\n/exports\n/feature_flags\n/feature_flags/new\n/feature_flags/staff\n/feature_flags/staff/cohorts\n/feature_flags/templates\n/feature_flags/{id}\n/functions/new/{templateId}\n/functions/{id}\n/games/368hedgehogs\n/games/flappyhog\n/games/shipit\n/groups/{groupTypeIndex}\n/groups/{groupTypeIndex}/new\n/groups/{groupTypeIndex}/{groupKey}\n/health\n/health/alerts\n/health/pipeline-status\n/health/sdk-health\n/health/{category}\n/heatmaps\n/heatmaps/new\n/heatmaps/recording\n/heatmaps/{id}\n/home\n/identity-matching\n/inbox\n/inbox/reports/triage\n/inbox/scouts/findings\n/inbox/scouts/runs\n/inbox/scouts/scratchpad\n/inbox/scouts/{skillName}\n/inbox/{tab}/{reportId}\n/insights\n/insights/new\n/insights/quick-start\n/insights/{id}\n/insights/{id}/edit\n/insights/{id}/sharing\n/insights/{id}/subscriptions\n/insights/{id}/subscriptions/{subscriptionId}\n/insights/{insightShortId}/alerts\n/instance/async_migrations\n/instance/async_migrations/future\n/instance/async_migrations/settings\n/instance/dead_letter_queue\n/instance/kafka_inspector\n/instance/metrics\n/instance/settings\n/instance/staff_users\n/instance/status\n/integrations/stripe/confirm-install\n/integrations/vercel/link-error\n/integrations/{kind}/callback\n/integrations/{slug}\n/legal\n/legal/new/{type}\n/link/{id}\n/links\n/live-debugger\n/login\n/login/2fa\n/login/2fa_setup\n/logs\n/logs/alerts/{alertId}/notifications/{hogFunctionId}\n/logs/alerts/{id}\n/logs/drop-rules/new\n/logs/drop-rules/{id}\n/logs/retention-rules/new\n/logs/retention-rules/{id}\n/managed_migrations\n/managed_migrations/new\n/marketing\n/mcp-analytics\n/mcp-analytics/activity\n/mcp-analytics/dashboard\n/mcp-analytics/intent-clustering\n/mcp-analytics/missing-capabilities\n/mcp-analytics/notifications\n/mcp-analytics/sessions\n/mcp-analytics/tool-quality\n/mcp-analytics/tool-quality/{toolName}\n/mcp-registry\n/mcp-servers\n/mcp-servers/agent/{id}\n/mcp-servers/member/{id}\n/mcp-servers/server/{id}\n/mcp-servers/{tab}\n/metrics\n/models\n/models/{id}\n/move-to-cloud\n/my-tickets\n/notebooks\n/notebooks/widgets/{widgetId}\n/notebooks/{shortId}\n/oauth/authorize\n/onboarding\n/organization-deactivated\n/organization-pending-deletion\n/organization/billing\n/organization/billing/overview\n/organization/billing/real-time-usage\n/organization/confirm-creation\n/organization/create-project\n/person/{id}\n/persons\n/persons/{uuid}\n/pipeline/batch-exports/new/{service}\n/pipeline/batch-exports/{id}\n/pipeline/new/\n/pipeline/plugins/{id}\n/preflight\n/product_tours\n/product_tours/{id}\n/project-pending-deletion\n/prompt-management/prompts\n/prompt-management/prompts/{name}\n/pulse\n/replay-vision\n/replay-vision/new/template\n/replay-vision/observations/{observationId}\n/replay-vision/{id}/budget\n/replay-vision/{id}/configure\n/replay-vision/{id}/details\n/replay-vision/{id}/overview\n/replay-vision/{id}/self-driving\n/replay-vision/{id}/template\n/replay-vision/{id}/triggers\n/replay/file-playback\n/replay/home\n/replay/kiosk\n/replay/playlists/{id}\n/replay/settings\n/replay/{id}\n/reset\n/reset/{userUuid}/{token}\n/reset_2fa/{userUuid}/{token}\n/resource-transfer/{resourceKind}/{resourceId}\n/sessions/{id}\n/settings/environment-approvals\n/settings/organization-authentication/{feature}/{configId}\n/settings/project\n/settings/user-feature-previews\n/shared/{token}\n/shared_dashboard/{shareToken}\n/signup\n/signup/{id}\n/site/{url}\n/skills\n/skills/community\n/skills/{categoryTab}\n/skills/{name}\n/slack-task-context\n/sql\n/stamphog\n/stamphog/digests\n/stamphog/install/callback\n/stamphog/runs\n/startups\n/streamlit-apps\n/streamlit-apps/new\n/streamlit-apps/{id}\n/streamlit-apps/{id}/edit\n/subscriptions\n/subscriptions/new\n/subscriptions/{id}\n/subscriptions/{id}/edit\n/support\n/support/settings\n/support/tickets\n/support/tickets/{ticketId}\n/surveys\n/surveys/form/new\n/surveys/guided/new\n/surveys/{id}\n/tasks\n/tasks/new\n/tasks/{taskId}\n/themes/custom-css\n/toolbar\n/tracing\n/unsubscribe\n/user_research\n/user_research/{id}\n/user_research/{topicId}/response/{responseId}\n/verify_email\n/visual_review\n/visual_review/repos/{repoId}/flakiness\n/visual_review/repos/{repoId}/runs\n/visual_review/repos/{repoId}/snapshots\n/visual_review/repos/{repoId}/{runType}/snapshots/{identifier}\n/visual_review/runs/{runId}\n/visual_review/settings\n/web\n/web-scripts\n/web-scripts/new\n/web/agents\n/web/bots\n/web/content-autopilot\n/web/health\n/web/live\n/web/marketing\n/web/page-performance\n/web/page-reports\n/web/recap\n/web/session-attribution-explorer\n/web/web-vitals\n/wizard/runs\n/workflows\n/workflows/library/messages/{id}\n/workflows/library/templates/new\n/workflows/library/templates/{id}\n/workflows/new/workflow\n/workflows/{id}/{tab}",
+ "description": "A path template copied verbatim from the catalog below (e.g. `/persons/{uuid}`). Its `{placeholders}` are filled from `params`. These slugs come from PostHog's canonical route table, so they are always correct — never pass a path that is not in this list.\n\n/account-connected/{kind}\n/account/credential-review\n/account/social-connected\n/activity-logs\n/activity/{tab}\n/agentic/account-mismatch\n/agentic/authorize\n/ai\n/ai-enrichment\n/ai-evals/datasets\n/ai-evals/datasets/{id}\n/ai-evals/evaluations\n/ai-evals/evaluations/offline/experiments\n/ai-evals/evaluations/offline/experiments/{experimentId}\n/ai-evals/evaluations/templates\n/ai-evals/evaluations/{id}\n/ai-evals/taggers\n/ai-evals/taggers/{id}\n/ai-gateway\n/ai-observability/clusters\n/ai-observability/clusters/{runId}/{clusterId}\n/ai-observability/dashboard\n/ai-observability/errors\n/ai-observability/generations\n/ai-observability/playground\n/ai-observability/reviews\n/ai-observability/self-driving\n/ai-observability/sentiment\n/ai-observability/sessions\n/ai-observability/sessions/{id}\n/ai-observability/tools\n/ai-observability/traces\n/ai-observability/traces/{id}\n/ai-observability/users\n/ai/history\n/alerts\n/approvals/{id}\n/billing/authorization_status\n/business-knowledge\n/business-knowledge/settings\n/business-knowledge/{id}\n/canvas\n/cli/authorize\n/cli/live\n/code-review\n/code/canvas/{channelId}/{dashboardId}\n/code/channel/{channelId}\n/code/loop/{loopId}\n/code/task/{taskId}\n/cohorts\n/cohorts/{id}\n/cohorts/{id}/calculation-history\n/connect/vercel/link\n/coupons/{campaign}\n/create-organization\n/customer_analytics\n/customer_analytics/accounts\n/customer_analytics/accounts/by-external-id/{externalId}\n/customer_analytics/accounts/{accountId}\n/customer_analytics/announcements\n/customer_analytics/configuration\n/customer_analytics/dashboard\n/customer_analytics/feature-requests\n/customer_analytics/feed\n/customer_analytics/journeys\n/customer_analytics/journeys/new\n/customer_analytics/journeys/templates\n/customer_analytics/journeys/{id}/edit\n/customer_analytics/notes\n/customer_analytics/tasks\n/dashboard\n/dashboard/templates/{templateId}/copy-to-project\n/dashboard/{id}\n/dashboard/{id}/sharing\n/dashboard/{id}/subscriptions\n/dashboard/{id}/subscriptions/{subscriptionId}\n/dashboard/{id}/tiles/{tileId}\n/data-catalog\n/data-catalog/metrics/{name}\n/data-management/actions\n/data-management/actions/new\n/data-management/actions/new/\n/data-management/actions/{id}\n/data-management/annotations\n/data-management/annotations/{id}\n/data-management/core-events\n/data-management/database\n/data-management/destinations\n/data-management/event-filtering\n/data-management/events\n/data-management/events/{id}\n/data-management/events/{id}/edit\n/data-management/history\n/data-management/ingestion-warnings\n/data-management/ingestion-warnings-v2\n/data-management/managed-viewsets\n/data-management/materialized-columns\n/data-management/properties\n/data-management/properties/{id}\n/data-management/properties/{id}/edit\n/data-management/revenue\n/data-management/schema\n/data-management/sources\n/data-management/sources/{id}/schemas\n/data-management/sources/{sourceId}/schemas/{schemaId}\n/data-management/transformations\n/data-management/variables\n/data-management/variables/{id}\n/data-management/variables/{id}/edit\n/data-management/warehouse-destinations\n/data-management/warehouse-properties\n/data-ops\n/data-warehouse/connect\n/data-warehouse/new-source\n/debug\n/debug/hog\n/early_access_features\n/early_access_features/{id}\n/embedded/{token}\n/endpoints\n/endpoints/{name}\n/engineering-analytics/authors/{handle}\n/engineering-analytics/health\n/engineering-analytics/overview\n/engineering-analytics/pull-requests\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/runs/{runId}\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/workflows/{workflowName}\n/engineering-analytics/repos/{repoOwner}/{repoName}/pull-requests/{number}\n/engineering-analytics/teams\n/engineering-analytics/teams/{ownerTeam}\n/engineering-analytics/test-health\n/engineering-analytics/workflows\n/error_tracking\n/error_tracking/alerts/new/{templateId}\n/error_tracking/alerts/{id}\n/error_tracking/fingerprint/{fingerprint}\n/error_tracking/{id}\n/events/{id}/{timestamp}\n/experiments\n/experiments/shared-metrics\n/experiments/shared-metrics/{id}\n/experiments/staff\n/experiments/{id}\n/exports\n/feature_flags\n/feature_flags/new\n/feature_flags/staff\n/feature_flags/staff/cohorts\n/feature_flags/templates\n/feature_flags/{id}\n/functions/new/{templateId}\n/functions/{id}\n/games/368hedgehogs\n/games/flappyhog\n/games/shipit\n/groups/{groupTypeIndex}\n/groups/{groupTypeIndex}/new\n/groups/{groupTypeIndex}/{groupKey}\n/health\n/health/alerts\n/health/pipeline-status\n/health/sdk-health\n/health/{category}\n/heatmaps\n/heatmaps/new\n/heatmaps/recording\n/heatmaps/{id}\n/home\n/identity-matching\n/inbox\n/inbox/reports/triage\n/inbox/scouts/findings\n/inbox/scouts/runs\n/inbox/scouts/scratchpad\n/inbox/scouts/{skillName}\n/inbox/{tab}/{reportId}\n/insights\n/insights/new\n/insights/quick-start\n/insights/{id}\n/insights/{id}/edit\n/insights/{id}/sharing\n/insights/{id}/subscriptions\n/insights/{id}/subscriptions/{subscriptionId}\n/insights/{insightShortId}/alerts\n/instance/async_migrations\n/instance/async_migrations/future\n/instance/async_migrations/settings\n/instance/dead_letter_queue\n/instance/kafka_inspector\n/instance/metrics\n/instance/settings\n/instance/staff_users\n/instance/status\n/integrations/stripe/confirm-install\n/integrations/vercel/link-error\n/integrations/{kind}/callback\n/integrations/{slug}\n/legal\n/legal/new/{type}\n/link/{id}\n/links\n/live-debugger\n/login\n/login/2fa\n/login/2fa_setup\n/logs\n/logs/alerts/{alertId}/notifications/{hogFunctionId}\n/logs/alerts/{id}\n/logs/drop-rules/new\n/logs/drop-rules/{id}\n/logs/retention-rules/new\n/logs/retention-rules/{id}\n/managed_migrations\n/managed_migrations/new\n/marketing\n/mcp-analytics\n/mcp-analytics/activity\n/mcp-analytics/dashboard\n/mcp-analytics/intent-clustering\n/mcp-analytics/missing-capabilities\n/mcp-analytics/notifications\n/mcp-analytics/sessions\n/mcp-analytics/tool-quality\n/mcp-analytics/tool-quality/{toolName}\n/mcp-registry\n/mcp-servers\n/mcp-servers/agent/{id}\n/mcp-servers/member/{id}\n/mcp-servers/server/{id}\n/mcp-servers/{tab}\n/metrics\n/models\n/models/{id}\n/move-to-cloud\n/my-tickets\n/notebooks\n/notebooks/widgets/{widgetId}\n/notebooks/{shortId}\n/oauth/authorize\n/onboarding\n/organization-deactivated\n/organization-pending-deletion\n/organization/billing\n/organization/billing/overview\n/organization/billing/real-time-usage\n/organization/confirm-creation\n/organization/create-project\n/person/{id}\n/persons\n/persons/{uuid}\n/pipeline/batch-exports/new/{service}\n/pipeline/batch-exports/{id}\n/pipeline/new/\n/pipeline/plugins/{id}\n/preflight\n/product_tours\n/product_tours/{id}\n/project-pending-deletion\n/prompt-management/prompts\n/prompt-management/prompts/{name}\n/pulse\n/replay-vision\n/replay-vision/new/template\n/replay-vision/observations/{observationId}\n/replay-vision/{id}/budget\n/replay-vision/{id}/configure\n/replay-vision/{id}/details\n/replay-vision/{id}/overview\n/replay-vision/{id}/self-driving\n/replay-vision/{id}/template\n/replay-vision/{id}/triggers\n/replay/file-playback\n/replay/home\n/replay/kiosk\n/replay/playlists/{id}\n/replay/settings\n/replay/{id}\n/reset\n/reset/{userUuid}/{token}\n/reset_2fa/{userUuid}/{token}\n/resource-transfer/{resourceKind}/{resourceId}\n/sessions/{id}\n/settings/environment-approvals\n/settings/organization-authentication/{feature}/{configId}\n/settings/project\n/settings/user-feature-previews\n/shared/{token}\n/shared_dashboard/{shareToken}\n/signup\n/signup/{id}\n/site/{url}\n/skills\n/skills/community\n/skills/{categoryTab}\n/skills/{name}\n/slack-task-context\n/sql\n/stamphog\n/stamphog/digests\n/stamphog/install/callback\n/stamphog/runs\n/startups\n/streamlit-apps\n/streamlit-apps/new\n/streamlit-apps/{id}\n/streamlit-apps/{id}/edit\n/subscriptions\n/subscriptions/new\n/subscriptions/{id}\n/subscriptions/{id}/edit\n/support\n/support/settings\n/support/tickets\n/support/tickets/{ticketId}\n/surveys\n/surveys/form/new\n/surveys/guided/new\n/surveys/{id}\n/tasks\n/tasks/new\n/tasks/{taskId}\n/themes/custom-css\n/toolbar\n/tracing\n/unsubscribe\n/user_research\n/user_research/{id}\n/user_research/{topicId}/response/{responseId}\n/verify_email\n/visual_review\n/visual_review/repos/{repoId}/flakiness\n/visual_review/repos/{repoId}/runs\n/visual_review/repos/{repoId}/snapshots\n/visual_review/repos/{repoId}/{runType}/snapshots/{identifier}\n/visual_review/runs/{runId}\n/visual_review/settings\n/web\n/web-scripts\n/web-scripts/new\n/web/agents\n/web/bots\n/web/content-autopilot\n/web/health\n/web/live\n/web/marketing\n/web/page-performance\n/web/page-reports\n/web/recap\n/web/session-attribution-explorer\n/web/web-vitals\n/wizard/runs\n/workflows\n/workflows/library/messages/{id}\n/workflows/library/templates/new\n/workflows/library/templates/{id}\n/workflows/new/workflow\n/workflows/{id}/{tab}",
"type": "string"
}
},