managing-endpoint-versions

Manage PostHog endpoint versions including rollback, preview, settings updates, and deactivation.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill managing-endpoint-versions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-endpoint-versions
Source: https://github.com/PostHog/posthog-foss/tree/main/products/endpoints/skills/managing-endpoint-versions
Command: npx skills add https://github.com/PostHog/posthog-foss --skill managing-endpoint-versions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostHog endpoints use a forward-only versioning model where any query change auto-cuts a new version and there is no pointer flip to restore an old version. This Skill guides you through safe rollback, preview, per-version settings updates, and single-version deactivation without breaking live callers.

Core Features & Use Cases

  • Rollback via Forking: Retrieve an older version's query with endpoint-get ?version=N and create a new top version containing that query, since rollback means forking rather than flipping a pointer.
  • Per-Version Settings Updates: Change description, data_freshness_seconds, or materialisation on a specific version using the version body param in endpoint-update without cutting a new version.
  • Surgical Deactivation: Disable a single version with is_active: false scoped to one version, or take the whole endpoint offline at once.
  • Use Case: You shipped a broken query as v5 last night. List versions, fetch v4's query, create v6 with that query, verify it with endpoint-run ?version=6, then deactivate v5 so no caller hits it accidentally.

Quick Start

Ask the agent to roll back your endpoint to the query from version 3 and confirm the new version works before deactivating the broken one.

Frequently Asked Questions about managing-endpoint-versions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I roll back a PostHog endpoint to an older version?

Rollback means forking: fetch the old version's query with endpoint-get ?version=N, then call endpoint-update with that query to create a new top version. There is no pointer flip, so the version number always increases.

How do I update endpoint settings without creating a new version?

Pass the version field in the endpoint-update body along with settings like description or data_freshness_seconds. Settings changes apply to that version in place, while passing a query together with version is rejected.

Can I deactivate one endpoint version without affecting others?

Yes, call endpoint-update with the version parameter and is_active: false to retire a single version. Callers pinned to that version get errors, while other versions and unpinned callers are unaffected.

Does editing an endpoint query always create a new version?

Yes, saving any query edit auto-cuts a new version and bumps the current version number. To preview safely, test the query with the execute-sql tool first, since there is no draft or staging concept.

What are the limitations of PostHog endpoint versioning?

The model is forward-only with no pointer flip, no draft or staging mode, and no way to activate an older version directly. Rollback creates a new version, and callers without ?version=N always hit the latest version.