a6-recipe-api-versioning

Automate APISIX API versioning via a6 CLI route and upstream configuration.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/api7/a6 --skill a6-recipe-api-versioning-api7
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: a6-recipe-api-versioning
Source: https://github.com/api7/a6/tree/main/skills/a6-recipe-api-versioning
Command: npx skills add https://github.com/api7/a6 --skill a6-recipe-api-versioning-api7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

API versioning is essential to evolve your APIs without breaking existing clients. This skill provides recipe-driven patterns to implement versioning strategies in APISIX via the a6 CLI, enabling safe, observable transitions between versions.

Core Features & Use Cases

  • URI path versioning: route /v1 and /v2 to different backends with proxy-rewrite.
  • Header-based versioning: use traffic-split to serve multiple versions from a single URI based on headers.
  • Query parameter versioning: switch versions using a version query parameter.
  • Gradual migration and deprecation: implement weighted rollout and redirection from old to new version.

Quick Start

Use a6 to create versioned upstreams and routes (v1/v2) and configure traffic-split rules to progressively move traffic.

Frequently Asked Questions about a6-recipe-api-versioning

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

FAQPage Schema
How do I version API routes in APISIX without breaking existing clients?▼

API versioning in APISIX routes different clients to specific backends safely. You configure versioned routes and upstreams using the a6 CLI to manage simultaneous versions and apply proxy-rewrite for URI path mapping.

What is the best way to gradually migrate traffic to a new API version?▼

Gradual migration uses weighted rollout rules to shift traffic incrementally. You apply the traffic-split plugin in APISIX to progressively move clients from an old upstream to a new one without sudden disruptions.

Can I use header-based versioning to serve multiple API versions from a single URI?▼

Header-based versioning serves multiple versions from a single URI by inspecting request headers. You use the traffic-split plugin in APISIX to route traffic to different upstreams based on specific header values.

How do I handle API deprecation and redirects during a version transition?▼

API deprecation manages transitions by redirecting clients from old endpoints to new ones. You configure proxy-rewrite and routing rules in APISIX to automate redirection and apply traffic-split for safe phase-outs.

Does the a6 CLI support declarative config updates for query parameter versioning?▼

The a6 CLI supports declarative config updates for query parameter versioning. You switch API versions using a version query parameter and apply these configurations declaratively through a6 commands to APISIX.