Circuit Termination Filter #5424

Closed
opened 2025-12-29 19:27:47 +01:00 by adam · 3 comments
Owner

Originally created by @wyatt-kinkade on GitHub (Sep 24, 2021).

Change Type

Correction

Area

REST API

Proposed Changes

REST API Documentation for /api/circuits/circuit-terminations references circuit_id as the filter value for Circuit IDs instead of cid which is the actual value that can be used to filter.

I noticed that the testing mechanism I had used was poor given that cid isn't acting as a filter, this isn't so much a documentation error as it is an issue leveraging the filter, but that still leaves the issue with the circuit_id filter not functioning.

image

curl -k -X GET "https://netbox.hometest.local/api/circuits/circuit-terminations/?circuit_id=TEST%2F335315315%2FGG" -H 

"accept: application/json" -H  "Authorization: Token c8a78738e7ed1305528704915bbdf3a6502e6004"
{"circuit_id":[""TEST/335315315/GG" is not a valid value."]}
Originally created by @wyatt-kinkade on GitHub (Sep 24, 2021). ### Change Type Correction ### Area REST API ### Proposed Changes ~REST API Documentation for `/api/circuits/circuit-terminations` references `circuit_id` as the filter value for Circuit IDs instead of `cid` which is the actual value that can be used to filter.~ I noticed that the testing mechanism I had used was poor given that `cid` isn't acting as a filter, this isn't so much a documentation error as it is an issue leveraging the filter, but that still leaves the issue with the `circuit_id` filter not functioning. ![image](https://user-images.githubusercontent.com/73535023/134692155-161186b3-7c1d-4554-94d2-974fd5d6dbec.png) ``` curl -k -X GET "https://netbox.hometest.local/api/circuits/circuit-terminations/?circuit_id=TEST%2F335315315%2FGG" -H "accept: application/json" -H "Authorization: Token c8a78738e7ed1305528704915bbdf3a6502e6004" {"circuit_id":[""TEST/335315315/GG" is not a valid value."]} ```
adam closed this issue 2025-12-29 19:27:47 +01:00
Author
Owner

@wyatt-kinkade commented on GitHub (Sep 24, 2021):

I noticed that the testing mechanism I had used was poor given that cid isn't acting as a filter, this isn't so much a documentation error as it is an issue leveraging the filter, but that still leaves the issue with the circuit_id filter not functioning. I've adjusted the title and initial post accordingly as such.

@wyatt-kinkade commented on GitHub (Sep 24, 2021): I noticed that the testing mechanism I had used was poor given that `cid` isn't acting as a filter, this isn't so much a documentation error as it is an issue leveraging the filter, but that still leaves the issue with the `circuit_id` filter not functioning. I've adjusted the title and initial post accordingly as such.
Author
Owner

@DanSheps commented on GitHub (Sep 24, 2021):

So, CID is a search I believe, circuit_id would be the numerical circuit_id for the circuit you are looking for.

I think I may have been mistaken when looking at this. I need to do some more investigation on my own and see what filters we have.

@DanSheps commented on GitHub (Sep 24, 2021): So, CID is a search I believe, circuit_id would be the numerical circuit_id for the circuit you are looking for. I think I may have been mistaken when looking at this. I need to do some more investigation on my own and see what filters we have.
Author
Owner

@jeremystretch commented on GitHub (Sep 26, 2021):

circuit_id maps on the numeric database ID of the Circuit object in NetBox, not to be confused with the cid field, which denotes the "real" provided-assigned identifier string for the circuit. There is no filter to match terminations based on the cid field.

@jeremystretch commented on GitHub (Sep 26, 2021): `circuit_id` maps on the numeric database ID of the Circuit object in NetBox, not to be confused with the `cid` field, which denotes the "real" provided-assigned identifier string for the circuit. There is no filter to match terminations based on the `cid` field.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5424