Add "empty" API filter on custom fields of type date #10584

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

Originally created by @SaschaSchwarzK on GitHub (Dec 18, 2024).

NetBox version

v4.1.8

Feature type

New functionality

Triage priority

I volunteer to perform this work (if approved)

Proposed functionality

When requesting data from API enable filtering for custom fields of type date for objects where the field is none.
example API call:
https://demo.netbox.dev/api/dcim/device-types/?cf_EOL_DATE__empty=true/

Use case

There is currently no way to filter objects by custom fields of type date to get only the objects where is no value set.
This functionality would improve the usability as it avoid to download all object and filter them in external code.

Database changes

none

External dependencies

none

Originally created by @SaschaSchwarzK on GitHub (Dec 18, 2024). ### NetBox version v4.1.8 ### Feature type New functionality ### Triage priority I volunteer to perform this work (if approved) ### Proposed functionality When requesting data from API enable filtering for custom fields of type date for objects where the field is none. example API call: https://demo.netbox.dev/api/dcim/device-types/?cf_EOL_DATE__empty=true/ ### Use case There is currently no way to filter objects by custom fields of type date to get only the objects where is no value set. This functionality would improve the usability as it avoid to download all object and filter them in external code. ### Database changes none ### External dependencies none
adam added the type: feature label 2025-12-29 21:33:23 +01:00
adam closed this issue 2025-12-29 21:33:23 +01:00
Author
Owner

@arthanson commented on GitHub (Feb 13, 2025):

This would need to work consistently across all they custom field types.

@arthanson commented on GitHub (Feb 13, 2025): This would need to work consistently across all they custom field types.
Author
Owner

@jeremystretch commented on GitHub (Aug 11, 2025):

After some investigation, I believe this is actually a bug: The empty lookup is intended to be supported for custom object data (of all types), however it is currently non-functional. I'm going to close this FR and instead address this in the current v4.3 release under bug #20012.

@jeremystretch commented on GitHub (Aug 11, 2025): After some investigation, I believe this is actually a bug: The `empty` lookup is intended to be supported for custom object data (of all types), however it is currently non-functional. I'm going to close this FR and instead address this in the current v4.3 release under bug #20012.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10584