דלגו לתוכן

API versioning policy

תוכן זה אינו זמין עדיין בשפה שלך.

The API version token is 1. Paths keep the names they have today, such as GET /stats. The version travels in an optional request header, AA-Version.

info.version in the OpenAPI document is 1.0.0. That is the document version. Its major number matches the API version token.

Send AA-Version: 1, or leave the header off. Leaving it off means version 1. 1 is the only defined value.

The parameter is documented on every operation in the OpenAPI document. It is optional.

Every hosted response includes AA-Version: 1, including errors.

On read and management routes, omit the header or send a blank value and the call is version 1. Any other value is 400 UNKNOWN_API_VERSION. The message names the value you sent and says the current version is 1.

Ingest, tracker, beacon, collect, and replay-recording routes ignore the request header. They still respond with AA-Version: 1. GET /tracker.js with AA-Version: 9 is a 200, not a 400.

Access-Control-Allow-Headers lists Content-Type, X-API-Key, Authorization, and Idempotency-Key. It does not list AA-Version, so a browser on another origin cannot send the header. Access-Control-Expose-Headers does not list AA-Version either, so that browser cannot read it.

Nothing in the current API is deprecated. Responses do not include Deprecation or Sunset.

A breaking change is one that makes a call that works today fail, or that changes the meaning of a field, an error code, or an enum value a client already reads.

These are breaking changes:

  • Removing a path, or renaming one
  • Removing a response field, renaming it, or changing its type
  • Changing the meaning of an existing field, error code, or enum value
  • Making an optional request field required
  • Tightening authorization so a call that is accepted today starts failing

These are backward compatible:

  • Adding an optional request field
  • Adding a response field
  • Adding a path
  • Adding an error code for a new failure case

A new enum value is called out in the changelog before it ships, because a client that treats the list as closed can break on a value it has not seen.

A breaking change ships as a new version token only after a deprecation window of at least 90 days. During that window the previous behavior stays available to callers on the current token.

When a behavior is in that window, responses for the retiring behavior include:

Header Value
Deprecation The HTTP-date when the deprecation started
Sunset The HTTP-date when that behavior stops

The time from Deprecation to Sunset is at least 90 days. After Sunset, that behavior is gone and callers use the newer token.

The changelog for shipped changes is the release notes.