Skip to content

Return site in circuit-list API #3338

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

Closed
tyler-8 opened this issue Jul 9, 2019 · 2 comments · Fixed by #4012
Closed

Return site in circuit-list API #3338

tyler-8 opened this issue Jul 9, 2019 · 2 comments · Fixed by #4012
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@tyler-8
Copy link
Contributor

tyler-8 commented Jul 9, 2019

Environment

  • Python version: 3.6.8
  • NetBox version: 2.5.13

Proposed Functionality

Add a_site and z_site keys to output of /circuits/circuits

Use Case

In the GUI when viewing the circuit listing, the table has a column that shows the site names for each termination (if it exists). This is extremely useful for filtering by site and generally viewing the circuit list. The API for circuits does not return this matched data however. In order to get the site, you also have to call /circuits/circuit-terminations/ as well, then pair the data up. This is a slow workflow within a script, and even more-so when trying to represent the data in an external tool.

The circuit API does allow you to filter by sites so it would also make it more manageable to know which circuit belongs to which site if you're filtering on multiple sites, without having to do even more API calls.

Database Changes

N/A

External Dependencies

N/A

@jeremystretch
Copy link
Member

If we're going to go that route, it would probably make more sense to return the whole termination rather than just the assigned site.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Jul 16, 2019
@tyler-8
Copy link
Contributor Author

tyler-8 commented Jul 16, 2019

Fair point - I'd considered that but opted for the 'lighter' output. Having the full terminations would definitely have value as well.

@jeremystretch jeremystretch added API change status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 13, 2019
jeremystretch added a commit that referenced this issue Jan 27, 2020
Fixes #3338: Added termination A and Z to the circuit
jeremystretch added a commit that referenced this issue Jan 27, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants