Skip to content
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

Add support for Nautobot REST API versioning in pynautobot #35

Closed
glennmatthews opened this issue Mar 22, 2022 · 0 comments · Fixed by #36
Closed

Add support for Nautobot REST API versioning in pynautobot #35

glennmatthews opened this issue Mar 22, 2022 · 0 comments · Fixed by #36
Assignees
Labels
enhancement New feature or request

Comments

@glennmatthews
Copy link
Contributor

We should add a user-friendly option for specifying the Nautobot REST API version to request:

  • for all requests coming from a given api instance (i.e. as an initialization/configuration parameter on the Api class)
  • for a specific request (i.e. as an optional parameter to the create(), get(), all(), etc. Endpoint methods, or (less ideally) as a setting directly on the api.http_session object).

Nautobot uses django-rest-framework's Accept-header versioning, so requesting a particular REST API version is a matter of specifying the appropriate HTTP header, such as Accept: application/json; version=1.3.

Supported API versions by Nautobot version:

Nautobot version REST API version(s)
1.0 1.0
1.1 1.1
1.2 1.2
1.3 1.2 (default), 1.3 (if requested)

Additional references and information:

@glennmatthews glennmatthews added the enhancement New feature or request label Mar 22, 2022
@glennmatthews glennmatthews changed the title Add support for Nautobot API versioning Add support for Nautobot REST API versioning in pynautobot Mar 22, 2022
@timizuoebideri1 timizuoebideri1 linked a pull request Apr 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants