-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API overhaul: add version prefix v1
to the API endpoints
#238
Comments
v1
v1
to the API urls
v1
to the API urlsv1
to the API endpoints
We know that using a hardcoded API version on the URL is not a good practice because it forces you to rewrite all URLs when you want to upgrade the API client. This is a temporary change that will allow us in the future to implement a new API without affecting current consumers. The current consumers only have to add the prefix now to continue using the API instead of changing their request to include a version value in the header, which is our preferred way to implement versioning in the new major API change. See GitHub API versioning for an example of how to implement API versions. |
For the time being we accept both versions `/api/` and `/api/v1`: http://0.0.0.0:1212/api/stats?token=MyAccessToken http://0.0.0.0:1212/api/v1/stats?token=MyAccessToken
7f4479a refactor(tests): one binary (Jose Celano) d9a4266 feat(api): [#238] API also served with version prefix /api/v1/ (Jose Celano) 70d94ad refactor(api): add namespace v1 to API (Jose Celano) Pull request description: Top commit has no ACKs. Tree-SHA512: 8a7a2a788c1f49b73e78cda2cb5938a1a8e3ab6b1e41a591cbb2979e9e148f12e29b8fe657c830258254b61c2d67efb58def698e3153cb8b5953afca15200fb0
Parent issue: #141
Add a URL prefix to all API urls:
Current URLs:
/api/key/:seconds_valid_or_key
/api/keys/reload
/api/stats
/api/torrent/:info_hash
/api/torrents
/api/whitelist/:info_hash
/api/whitelist/reload
New URLs:
/api/v1/key/:seconds_valid_or_key
/api/v1/keys/reload
/api/v1/stats
/api/v1/torrent/:info_hash
/api/v1/api/torrents
/api/v1/whitelist/:info_hash
/api/v1/whitelist/reload
We will keep the current ones (without prefixes) until we update the torrust index backend.
The text was updated successfully, but these errors were encountered: