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

Add date sort order for test_imports API #11388

Open
ptitkosmos opened this issue Dec 9, 2024 · 0 comments · May be fixed by #11448
Open

Add date sort order for test_imports API #11388

ptitkosmos opened this issue Dec 9, 2024 · 0 comments · May be fixed by #11448

Comments

@ptitkosmos
Copy link

Is your feature request related to a problem? Please describe
I need to get the last import date for a test. Currently, the API (GET
/api/v2/test_imports/) provides them in "from older to recent" order. So the one I want is always at the end.

Describe the solution you'd like
Can you add a parameter to order data at least on the date (created) asc and desc ?

Describe alternatives you've considered
Currently, I do 2 queries. The first one with the test id and a limit of 1, to know the total count of reimport. Then the second is with the test id, a limit of 1 and an offset set to ("total count" minus 1). In this way, the queries are light and fast enough.

Thanks

@hblankenship hblankenship linked a pull request Dec 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant