-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support time range constraints for changelog in API #1146
Comments
Hello @Thetacz, if you are using the API, you can use the q query in the following form:
So in this case, you can try this URL:
Does this work for your use case? Keep in mind, when using the filter, it appears that you have to specify a time range, rather than just before or after. |
I believe you can enable the individual before & after filters if you specify the nautobot/nautobot/extras/filters.py Line 625 in 1710dd4
time__gte = django_filters.DateTimeFilter(field_name="time", lookup_expr="gte")
time__lte = django_filters.DateTimeFilter(field_name="time", lookup_expr="lte") |
Thanks @joewesch, actually, explicitly adding those to the FilterSet allows it to be used in GraphQL as well. I'll add that as time_before and time_after. |
User Story
As Arthur the API user...,
I want to get changes done over some period...,
So that I don't I don't have to fetch all (600k) object changes…,
I will know this is done when API supports time range constraints in any form (
before
/after
,time__lt
/time__gt
...).Note: It is already possible in UI.
Database Changes
None
External Dependencies
None
The text was updated successfully, but these errors were encountered: