API lookup expression (i)ew, (i)regex broken for /dcim/interfaces #200

Closed
opened 2026-04-05 16:22:56 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @FestplattenSchnitzel on 3/6/2026

NetBox Edition

NetBox Community

NetBox Version

4.5.4

Python Version

3.12

Steps to Reproduce

  1. Run any of
  1. Run https://demo.netbox.dev/api/dcim/interfaces/?type__ew=base-t

Expected Behavior

Both requests should succeed and return correct results according to the documentation.

Observed Behavior

  1. e.g.
HTTP 400 Bad Request
Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE
Content-Type: application/json
Vary: Accept

{
    "type__iew": [
        "Select a valid choice. base-t is not one of the available choices."
    ]
}
  1. Query returns HTTP 200 and results, but the result set contains data that should have been removed by the filter, e.g. 1000base-x-sfp
*Originally created by @FestplattenSchnitzel on 3/6/2026* ### NetBox Edition NetBox Community ### NetBox Version 4.5.4 ### Python Version 3.12 ### Steps to Reproduce 1. Run any of - https://demo.netbox.dev/api/dcim/interfaces/?type__iew=base-t - https://demo.netbox.dev/api/dcim/interfaces/?type__regex=base-t - https://demo.netbox.dev/api/dcim/interfaces/?type__iregex=base-t 2. Run https://demo.netbox.dev/api/dcim/interfaces/?type__ew=base-t ### Expected Behavior Both requests should succeed and return correct results according to the [documentation](https://netboxlabs.com/docs/netbox/reference/filtering/#lookup-expressions). ### Observed Behavior 1. e.g. ~~~ HTTP 400 Bad Request Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE Content-Type: application/json Vary: Accept { "type__iew": [ "Select a valid choice. base-t is not one of the available choices." ] } ~~~ 2. Query returns HTTP 200 and results, but the result set contains data that should have been removed by the filter, e.g. `1000base-x-sfp`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#200