API Versioning
The Rivegen API uses URL-based versioning.
Current Version
The current API version is v1, accessible at:
https://api.rivegen.com/api/v1/
For convenience, endpoints are also available at /api/ (which defaults to v1).
Version Format
Version numbers follow semantic versioning principles:
- Major versions (
v1,v2) - Breaking changes - Minor versions - Backward-compatible additions
- Patch versions - Bug fixes (transparent to API consumers)
Deprecation Policy
When an endpoint or feature is deprecated:
- A deprecation notice will be included in the response headers
- Documentation will indicate the deprecation date and replacement endpoint
- Deprecated endpoints remain functional for at least 6 months
- Breaking changes are communicated at least 3 months in advance
Example Deprecation Header
X-API-Deprecated: true
X-API-Deprecation-Date: 2024-07-15
X-API-Replacement: /api/v2/rivers/{river_id}
Checking API Version
Include the API version in requests:
curl -X GET "https://api.rivegen.com/api/v1/rivers" \
-H "Authorization: Bearer <token>"
Migrating Between Versions
When upgrading to a new major version:
- Review the Changelog for breaking changes
- Test your integration against the new version in a staging environment
- Update your API client to use the new version URL
- Update request/response handling for any schema changes
See Also
- Changelog - Version history and changes
- Error Handling - Handling version-related errors