API Versioning
Complete guide to API versioning in Netasampark.
Overview
The Netasampark API uses URL-based versioning to ensure backward compatibility and allow for future enhancements.
Current Version
Current Version: v1 (default)
The current API version is v1. When no version is specified, requests default to v1.
Version Format
API versions are specified in the URL path:
https://api.netasampark.com/api/v1/endpoint
Versioning Strategy
Major Versions
Major versions (v1, v2, etc.) indicate breaking changes:
- Removed endpoints
- Changed request/response formats
- Removed required fields
- Changed authentication methods
Minor Updates
Minor updates within a version maintain backward compatibility:
- New endpoints
- New optional fields
- New response fields
- Bug fixes
Using Versions
Default (v1)
GET /api/voters
Explicit Version
GET /api/v1/voters
Future Versions
GET /api/v2/voters
Version Deprecation
When a version is deprecated:
- Announcement: 6 months notice
- Warning Headers: Deprecation warnings in responses
- Sunset Date: Final shutdown date
- Migration Guide: Documentation for upgrading
Migration Guide
When upgrading to a new version:
- Review Changelog
- Test in staging environment
- Update SDK versions
- Update integration code
- Deploy to production
Best Practices
- Always Specify Version: Use explicit version in URLs
- Monitor Deprecations: Watch for deprecation notices
- Test Updates: Test new versions before production
- Stay Updated: Keep SDKs and integrations updated
Next Steps
Need help? Contact Support