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.

2.4 KB
Raw Blame
/**
 * Auto-generated from the Django backend OpenAPI schema.
 * MCP service uses these Zod schemas for generated tool handlers.
 * To regenerate: hogli build:openapi
 *
 * PostHog API - MCP 3 enabled ops
 * OpenAPI spec version: 1.0.0
 */
import * as zod from 'zod'

/**
 * Dashboards the organization owns, holding insights from one or more projects.
 */
export const CrossProjectDashboardsListParams = () => zod.object({
    organization_id: zod
        .string()
        .describe(
            "ID of the organization you're trying to access. To find the ID of the organization, make a call to \/api\/organizations\/."
        ),
})

export const crossProjectDashboardsListQueryLimitMax = 100

export const CrossProjectDashboardsListQueryParams = () => zod.object({
    limit: zod
        .number()
        .max(crossProjectDashboardsListQueryLimitMax)
        .optional()
        .describe('Number of results to return per page.'),
    offset: zod.number().optional().describe('The initial index from which to return the results.'),
})

/**
 * Tiles on one cross-project dashboard, edited one at a time.
 *
 * Writes are per tile rather than a whole-set replace, so two people editing the same
 * dashboard cannot overwrite each other's tiles.
 */
export const CrossProjectDashboardsTilesListParams = () => zod.object({
    dashboard_id: zod.string().describe('Id of the dashboard.'),
    organization_id: zod
        .string()
        .describe(
            "ID of the organization you're trying to access. To find the ID of the organization, make a call to \/api\/organizations\/."
        ),
})

export const crossProjectDashboardsTilesListQueryLimitMax = 100

export const CrossProjectDashboardsTilesListQueryParams = () => zod.object({
    limit: zod
        .number()
        .max(crossProjectDashboardsTilesListQueryLimitMax)
        .optional()
        .describe('Number of results to return per page.'),
    offset: zod.number().optional().describe('The initial index from which to return the results.'),
})

/**
 * Dashboards the organization owns, holding insights from one or more projects.
 */
export const CrossProjectDashboardsRetrieveParams = () => zod.object({
    id: zod.string().describe('Id of the dashboard.'),
    organization_id: zod
        .string()
        .describe(
            "ID of the organization you're trying to access. To find the ID of the organization, make a call to \/api\/organizations\/."
        ),
})