Get devices filter on site_group slug #10665

Closed
opened 2025-12-29 21:34:27 +01:00 by adam · 2 comments
Owner

Originally created by @xibriz on GitHub (Jan 17, 2025).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.0.8

Python Version

3.10

Steps to Reproduce

curl -X 'GET' \
  '/api/dcim/devices/?site_group=test' \
  -H 'accept: application/json'

Expected Behavior

All the devices belonging to the Site Group with the slug test

Observed Behavior

From the API explorer:

Please correct the following validation errors and try again.
For 'site_group' at path '[0]': Value must be an integer.
Originally created by @xibriz on GitHub (Jan 17, 2025). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.0.8 ### Python Version 3.10 ### Steps to Reproduce ```bash curl -X 'GET' \ '/api/dcim/devices/?site_group=test' \ -H 'accept: application/json' ``` ### Expected Behavior All the devices belonging to the Site Group with the slug `test` ### Observed Behavior From the API explorer: ``` Please correct the following validation errors and try again. For 'site_group' at path '[0]': Value must be an integer. ```
adam added the type: bug label 2025-12-29 21:34:27 +01:00
adam closed this issue 2025-12-29 21:34:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 17, 2025):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.2.1. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

@jeremystretch commented on GitHub (Jan 17, 2025): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.2.1. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.
Author
Owner

@xibriz commented on GitHub (Jan 21, 2025):

@jeremystretch This seems to be fixed in the latest release. Could not find anything in the change logs, but comparing the API spesification of v4.0.8 and v4.2.0 shows that the input has changed from array[integer] to array[string] which is correct. It also works as expected :)

4.0.8

Image

4.2.0

Image

@xibriz commented on GitHub (Jan 21, 2025): @jeremystretch This seems to be fixed in the latest release. Could not find anything in the change logs, but comparing the API spesification of v4.0.8 and v4.2.0 shows that the input has changed from `array[integer]` to `array[string]` which is correct. It also works as expected :) 4.0.8 ![Image](https://github.com/user-attachments/assets/acce193e-e020-48bb-94a7-113410fef8cf) 4.2.0 ![Image](https://github.com/user-attachments/assets/c9ad5b51-f1a4-467d-a298-6e5781afef11)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10665