API location filter wrong datatype #8672

Closed
opened 2025-12-29 20:39:42 +01:00 by adam · 5 comments
Owner

Originally created by @aauerswald on GitHub (Sep 25, 2023).

NetBox version

v.3.6.2

Python version

3.8

Steps to Reproduce

  • Add a location to netbox and a rack assigned to these location. remember id and slug of the location.
  • Go to your site api/schema/swagger-ui/#/dcim/dcim_racks_list
  • Navigate to location filter:
  • location array
  • location__narray
  • try the location slug and location id

Expected Behavior

using a slug as filter in field location array/location__narray result the filtered racks list

Observed Behavior

no result by using the id (Select a valid choice ....)
no result by using the slug (index0errorValue must be an integer)

Originally created by @aauerswald on GitHub (Sep 25, 2023). ### NetBox version v.3.6.2 ### Python version 3.8 ### Steps to Reproduce - Add a location to netbox and a rack assigned to these location. remember id and slug of the location. - Go to your site api/schema/swagger-ui/#/dcim/dcim_racks_list - Navigate to location filter: - location array - location__narray - try the location slug and location id ### Expected Behavior using a slug as filter in field location array/location__narray result the filtered racks list ### Observed Behavior no result by using the id (Select a valid choice ....) no result by using the slug (index0errorValue must be an integer)
adam added the type: bugstatus: needs ownerseverity: lowtopic: OpenAPI labels 2025-12-29 20:39:43 +01:00
adam closed this issue 2025-12-29 20:39:43 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 25, 2023):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Sep 25, 2023): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@aauerswald commented on GitHub (Sep 26, 2023):

I changed the report.

@aauerswald commented on GitHub (Sep 26, 2023): I changed the report.
Author
Owner

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

Please specify the exact API request you're sending.

@jeremystretch commented on GitHub (Sep 26, 2023): Please specify the exact API request you're sending.
Author
Owner

@aauerswald commented on GitHub (Oct 5, 2023):

curl -X 'GET'
'https://YOURDOMAIN/api/dcim/racks/?location=YOUR-LOCATION-ID'
-H 'accept: application/json'

image

image

@aauerswald commented on GitHub (Oct 5, 2023): curl -X 'GET' \ 'https://YOURDOMAIN/api/dcim/racks/?location=YOUR-LOCATION-ID' \ -H 'accept: application/json' ![image](https://github.com/netbox-community/netbox/assets/7852951/dcbcba4b-a3be-4529-a411-312c6c550eb9) ![image](https://github.com/netbox-community/netbox/assets/7852951/a9149344-c42e-4e02-b1c2-33a6e47395cc)
Author
Owner

@arthanson commented on GitHub (Jun 17, 2024):

This is a dupe of #13459 Closing this issue

@arthanson commented on GitHub (Jun 17, 2024): This is a dupe of #13459 Closing this issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8672