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.

978 B
Raw Blame
from posthog.api.routing import RouterRegistry

from products.batch_exports.backend.presentation.views import file_download
from products.batch_exports.backend.presentation.views.batch_export import backfills, exports, runs


def register_routes(routers: RouterRegistry) -> None:
    batch_exports_router = routers.projects.register(
        r"batch_exports", exports.BatchExportViewSet, "project_batch_exports", ["team_id"]
    )

    routers.projects.register(
        r"file_download_batch_exports",
        file_download.FileDownloadBatchExportOnDemandViewSet,
        "project_file_download_batch_exports",
        ["team_id"],
    )

    batch_exports_router.register(
        r"runs", runs.BatchExportRunViewSet, "project_batch_export_runs", ["team_id", "batch_export_id"]
    )

    batch_exports_router.register(
        r"backfills",
        backfills.BatchExportBackfillViewSet,
        "project_batch_export_backfills",
        ["team_id", "batch_export_id"],
    )