Skip to content
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

Cannot filter on started_at in REST API #5529

Closed
rossburton opened this issue Sep 1, 2020 · 4 comments · Fixed by #5606
Closed

Cannot filter on started_at in REST API #5529

rossburton opened this issue Sep 1, 2020 · 4 comments · Fixed by #5606

Comments

@rossburton
Copy link

I wanted to list all builds in the last week using the REST API. .../api/v2/builds?order=-started gets the list of all builds ever sorted in date order, but adding for example started_at__ge=1598375285 to filter to just builds started after a specific timestamp results in an invalid filter value for started_at__ge.

@rossburton rossburton changed the title Cannot filter on started_at Cannot filter on started_at in REST API Sep 1, 2020
@smrnmakhija
Copy link

Can you give some guidelines to reproduce?

@senyai
Copy link
Contributor

senyai commented Nov 1, 2020

Would you like started_at__ge=2010-10-25 to also work?

@rossburton
Copy link
Author

That would be nice, but a first step of a machine-readable integer (unix timestamp, presumably) would work.

@tardyp
Copy link
Member

tardyp commented Nov 16, 2020

I think that it makes sense to also allow 2010-10-25 like strings. If there are dash in the string, then try to parse a date with iso8601 derivatives

maybe something like this:

YYYY-MM-dd
YYYY-MM-ddTHH:mm
YYYY-MM-ddTHH:mm:ss
YYYY-MM-ddTHH:mm:ss.ss
YYYY-MM-ddTHH:mm:ss.ss±hh:mm

I'll leave it to you to create a new issue on this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants