Device name filtering with multiple parameters not working #2114

Closed
opened 2025-12-29 17:22:25 +01:00 by adam · 0 comments
Owner

Originally created by @kirpit on GitHub (Nov 9, 2018).

Environment

  • Python version: 3.6.3
  • NetBox version: Latest dev (61ca7ee7)

Steps to Reproduce

As it is described in the docs, we can apply same filter with multiple values:

GET /api/ipam/prefixes/?status=1&status=2

Unfortunately, this doesn't work for specifically the "name" field for devices endpoint and it returns only 1 result of the last queried value.

GET /api/dcim/devices/?name=foo&name=bar&name=baz

Expected Behavior

Endpoint to return all 3 devices; foo, bar, baz.

Observed Behavior

Endpoint returning only 1 device; baz.

========
I am happy to help, if pointed in the right direction for the fix and to have a test.

Originally created by @kirpit on GitHub (Nov 9, 2018). ### Environment * Python version: 3.6.3 * NetBox version: Latest dev (61ca7ee7) ### Steps to Reproduce As it is [described][doco] in the docs, we can apply same filter with multiple values: > GET /api/ipam/prefixes/?**status**=1&**status**=2 Unfortunately, this doesn't work for specifically the "name" field for devices endpoint and it returns only 1 result of the last queried value. > GET /api/dcim/devices/?**name**=foo&**name**=bar&**name**=baz ### Expected Behavior Endpoint to return all 3 devices; foo, bar, baz. ### Observed Behavior Endpoint returning only 1 device; baz. ======== I am happy to help, if pointed in the right direction for the fix and to have a test. [doco]: https://netbox.readthedocs.io/en/latest/api/overview/#filtering
adam added the status: acceptedtype: documentation labels 2025-12-29 17:22:25 +01:00
adam closed this issue 2025-12-29 17:22:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2114