Deprecate the _choices API endpoints
See original GitHub issueEnvironment
- Python version: 3.5.2
- NetBox version: 2.6.2
Proposed Change
The NetBox REST API provides a _choices
endpoint under each app (e.g. /api/circuits/_choices/
) which lists the available values and labels for each choice field within the app. As @lampwins recently pointed out, the Django REST Framework exposes these choices (as well as other useful field attributes) via an OPTIONS
HTTP request.
More investigation is needed, however it is likely that we can ditch the statically defined _choices
endpoints in favor of using the built-in OPTIONS
behavior.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Deprecating API Endpoints
If global API versions are used, then every API end point inside that version is deprecated at the same time: /v1/foo and /v1/bar...
Read more >How to Smartly Sunset and Deprecate APIs
When an API is deprecated, this means an API is not usable in its current form for the purpose intended. This usually means...
Read more >Can I deprecate this endpoint? - Pixie Labs Blog
Now that you know how your API is being used, you can create a deprecation plan. Developers don't appreciate surprise deprecations, so it's...
Read more >What Organizations Need to Know When Deprecating APIs
How to efficiently deprecate an API · Communicate honestly · Provide a long enough sunset period · Version effectively · Provide alternatives.
Read more >API Lifecycle, Versioning, and Deprecation
API Geriatrics—or old age care—comes into play here. At some point, the site or service who owns the API endpoints may need to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI, the new
Endpoint.choices()
has been merged inmaster
branch of pynetbox:https://pynetbox.readthedocs.io/en/latest/endpoint.html#pynetbox.core.endpoint.Endpoint.choices
Just to show an example of
Endpoint.choices()
with the string values in 2.7-beta1, works fine: