API filtering 'OR' logic not working for dcim/devices "mac_address #2714

Closed
opened 2025-12-29 18:21:21 +01:00 by adam · 1 comment
Owner

Originally created by @ajknv on GitHub (Jul 1, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.0

Steps to Reproduce

  1. Issue an API query with filter parameters specifying two different mac_address values, for example:
    https://netbox/api/dcim/devices/?mac_address=02%3A46%3A8A%3ABD%3AF1%3A35&mac_address=AB%3A77%3A65%3A4D%3ACB%3A10

Expected Behavior

API will return the two devices that have associated interfaces with the corresponding MAC addresses. (In this observed repro, the interfaces are known to be associated with distinct devices.)

Observed Behavior

API returned only the device with an interface matching the final mac_address filter, in this case the device with an interface for AB:77:65:4D:CB:10

Originally created by @ajknv on GitHub (Jul 1, 2019). ### Environment * Python version: 3.6.8 * NetBox version: 2.6.0 ### Steps to Reproduce 1. Issue an API query with filter parameters specifying two different mac_address values, for example: https://netbox/api/dcim/devices/?mac_address=02%3A46%3A8A%3ABD%3AF1%3A35&mac_address=AB%3A77%3A65%3A4D%3ACB%3A10 ### Expected Behavior API will return the two devices that have associated interfaces with the corresponding MAC addresses. (In this observed repro, the interfaces are known to be associated with distinct devices.) ### Observed Behavior API returned only the device with an interface matching the final mac_address filter, in this case the device with an interface for AB:77:65:4D:CB:10
adam closed this issue 2025-12-29 18:21:21 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 1, 2019):

Don't need a separate issue for this. Please just update #3315.

@jeremystretch commented on GitHub (Jul 1, 2019): Don't need a separate issue for this. Please just update #3315.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2714