Runbooks / Api Versioning

API Versioning

The IdentityMesh Admin API has two path prefixes that return the same responses:

PrefixStatusExample
/api/v1/Stable — forward-compatibleGET /api/v1/connectors
/api/Legacy — in place for the Angular UI, the relay agent, and pre-v1 integrations. Kept working indefinitely for now.GET /api/connectors

A path-rewrite middleware strips the /v1/ segment before endpoint routing, so both forms resolve to the same handler and produce the same response — bodies, status codes, headers, rate-limiting partition keys, admin-audit rows. There is no separate registration for the v1 prefix; one handler serves both.

When to use which prefix

What v1 is committed to

While the v1 designation is in effect, we treat these as breaking changes requiring a v2 (i.e. a second prefix plus a deprecation window on v1):

These are fair game within v1 and don’t require a new prefix:

Operational notes

Future v2

When a breaking change is ready:

  1. Register the new route shape under /api/v2/... (either with a second set of MapXxx calls, or by route-grouping the v2 handlers in a MapGroup("/api/v2")).
  2. Keep the v1 handlers in place — don’t remove them in the same release that ships v2. A typical deprecation window is two minor versions; operators get at least one release to migrate.
  3. Stamp a Deprecation response header (RFC 9745) on v1 calls during the window so callers discover the cutover without reading changelogs.
  4. At the end of the deprecation window, delete v1 handlers and retire the path-rewrite middleware’s v1-to-legacy mapping in the same release.