Aller au contenu
Skillpedia
Bases de données41k · #6863

managing-endpoint-versions

Ce qu’il fait

Cette skill explique comment fonctionnent les versions d'endpoint et comment revenir en arrière ou prévisualiser des modifications sans perturber l'usage en cours. Elle s'adresse aux personnes qui modifient des endpoints et veulent éviter les mauvaises surprises.

Quand l’utiliser

  • ✓Quand vous voulez revenir à une ancienne version d'un endpoint.
  • ✓Quand vous voulez tester une modification de requête dans le bac à sable avant qu'elle ne soit active.
  • ✓Quand vous voulez modifier une description ou un paramètre de fraîcheur sur une version sans créer de nouvelle version.

Lien du skill

https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/managing-endpoint-versions/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/managing-endpoint-versions/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Comment revenir à la version 3 de mon endpoint ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

La modification de la requête crée une nouvelle version, tandis que la modification des paramètres met à jour sur place la version choisie. La skill s'appuie sur cette distinction pour vous indiquer des moyens sûrs de tester et de revenir en arrière.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Managing endpoint versions

This skill is the practical guide to endpoint versioning. It covers the today-workflow, which has some sharp edges worth being explicit about.

When to use this skill

  • "How do I roll back to v3?"
  • "I want to test changes before they go live"
  • "How do I update the description / data_freshness_seconds on a specific version?"
  • "Can I disable v4 without affecting v5?"
  • The user is uncertain whether a query change will cut a new version

Versioning model — what to know

Behaviour Reality
Query change Auto-cuts a new version. Saving any edit to the query creates a new version and bumps the current version number
Settings change (description, data_freshness_seconds, materialisation) Does not cut a new version. Updates the targeted version in place
The "current" version Always the highest version number — it's not a pointer you can move backwards
Calling without ?version=N Runs the latest version. So unpinned callers always hit the newest
Disabling the whole endpoint endpoint-update with is_active: false (no version) takes every version offline at once
Disabling a single version endpoint-update with version + is_active: false retires one version without affecting the others

The model is forward-only. There is no "make v3 the default again" operation today. Practically this means "rollback" requires either creating a new top version that re-uses the old query, or pinning callers to ?version=N.

Available tools

Tool Purpose
endpoint-versions List all versions for an endpoint, latest first
endpoint-get Full config; supports ?version=N to fetch a specific version
endpoint-update The workhorse — supports version body param to target a specific version
endpoint-run Execute a version directly via ?version=N (without affecting which version other callers hit)

Workflows

Previewing a draft before publishing

There is no "draft" concept in the model. Editing the query commits it as a new version immediately. To preview safely:

  1. Test the new query first with the execute-sql tool (or the SQL editor) — not on the live endpoint
  2. When ready, update the endpoint — this creates the new version automatically
  3. Use endpoint-run with ?version=N to confirm the new version returns what you expect
  4. Old callers still hit the latest version (which is now your new version) — there is no "soft launch"

If the user needs a true staging endpoint, the only workaround today is a sibling endpoint with a _v2 or _staging suffix. Document this honestly — there is no in-product staging path.

Rolling back to an older version

The forward-only model means "rollback" requires forking:

  1. endpoint-versions to find the version with the good query (say v3)
  2. endpoint-get with ?version=3 to retrieve that version's query JSON
  3. endpoint-update with the v3 query as the new query — this creates a new version (e.g. v6) with the same query as v3
  4. All callers without ?version=N now hit v6 (== v3's query)

The old version (v5, the broken one) still exists and is still callable via ?version=5 until explicitly deactivated.

Faster mitigation if you can change every caller: have them pin to ?version=3 until a real fix is ready. Lower-impact than cutting a

Questions fréquentes

La modification d'un paramètre crée-t-elle une nouvelle version ?

Non. Les paramètres comme la description ou la fraîcheur mettent à jour sur place la version ciblée.

La modification de la requête crée-t-elle une nouvelle version ?

Oui. Enregistrer une modification de requête crée automatiquement une nouvelle version et fait monter le numéro de version actuel.

Puis-je désactiver une ancienne version sans toucher à la nouvelle ?

Oui. La skill couvre la désactivation d'une version précise, qui laisse les autres inchangées.

Détails

Description originale de l’auteur

Work safely with endpoint versions — preview a draft in the playground, roll back to an older version, update settings on one version without bumping query history, deactivate a specific version. Use when the user asks "how do I roll back my endpoint", "preview my changes before publishing", "I want to fix v5 without bumping the version", or anything involving the version history. Calls out today's limitations honestly: there is no pointer flip; "rollback" means forking the old query into a new top version.

repo: PostHog/posthog

Popularité

Étoiles GitHub
41k
Position au classement
#6863
Licence
—
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires