Strategies for evolving the API without breaking changes, deprecation standards, and stability commitmentsThe k0rdent API uses URL-path versioning to ensure stability and provide clear upgrade paths for API clients.
Version Format
All API endpoints include the version in the URL path using the/v1/ prefix:
Version Policy
k0rdent follows these versioning principles:Major Versions Only
- Version identifiers use major version numbers only:
v1,v2, etc. - No minor version numbers in the URL (e.g., no
v1.1orv1.2) - Breaking changes require a new major version
Feature Flags Over Minor Versions
Instead of minor versions, new features are:- Added to existing versions in a backward-compatible way
- Controlled via feature flags when necessary
- Announced through deprecation warnings in responses
No Version in Response
The API version is not included in response bodies. The URL path is the authoritative source of the version being used.Deprecation Timeline
When features or endpoints need to be deprecated:- 6-month notice period - Deprecation announcements provide at least 6 months notice before removal
- Warning headers - Deprecated endpoints return warnings in the
meta.warningsarray - Migration guides - Documentation links provided for upgrading to new patterns
Deprecation Warning Format
Deprecated endpoints or fields include warnings in the response:Warning Object Fields
| Field | Description |
|---|---|
code | Warning type: DEPRECATED_FIELD or DEPRECATED_ENDPOINT |
message | Human-readable description of the deprecation |
field | The deprecated field name (for field deprecations) |
sunset | ISO 8601 date when the feature will be removed |
migration | URL to migration documentation |
Endpoint Deprecation Example
When an entire endpoint is deprecated:Best Practices
For API Consumers
- Monitor warning arrays - Check
meta.warningsin responses and log them - Plan migrations early - Donβt wait until the sunset date
- Use version pinning - Explicitly specify the version in all requests
- Test new versions - When a new major version is released, test in a staging environment
For API Producers
- Maintain backward compatibility - Within a major version, never break existing clients
- Provide clear migration paths - Include detailed migration guides
- Give advance notice - Minimum 6 months for deprecations
- Support multiple versions - Keep at least two major versions active during transitions
Upgrading to a New Version
When a new major version is released:- Review the changelog and migration guide
- Test the new version in a development or staging environment
- Update your API base URL to use the new version
- Monitor for any deprecation warnings in the new version
- Gradually roll out the change to production