Skip to main content

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:

  1. Announcement: 6 months notice
  2. Warning Headers: Deprecation warnings in responses
  3. Sunset Date: Final shutdown date
  4. Migration Guide: Documentation for upgrading

Migration Guide

When upgrading to a new version:

  1. Review Changelog
  2. Test in staging environment
  3. Update SDK versions
  4. Update integration code
  5. Deploy to production

Best Practices

  1. Always Specify Version: Use explicit version in URLs
  2. Monitor Deprecations: Watch for deprecation notices
  3. Test Updates: Test new versions before production
  4. Stay Updated: Keep SDKs and integrations updated

Next Steps


Need help? Contact Support