Description
Please confirm the following
- I agree to follow this project's code of conduct.
- I have checked the current issues for duplicates.
- I understand that AWX is open source software provided for free and that I might not receive a timely response.
- I am NOT reporting a (potential) security vulnerability. (These should be emailed to
[email protected]
instead.)
Bug Summary
It is currently not possible to filter on AWX /api/v2/jobs/
using the limit
field.
AWX version
24.6.0
Select the relevant components
- UI
- UI (tech preview)
- API
- Docs
- Collection
- CLI
- Other
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
No response
Steps to reproduce
Precondition: Jobs have run on different host using limit
during execution.
GET /api/v2/jobs/?limit=localhost
Expected results
A list of jobs limited to the ones which have localhost
in the limit
field.
Actual results
No filtering is done, and all jobs are returned.
Additional information
This behavior is also suggested by the documentation on filtering, limit is even mentioned in the example for exact matching.
The field is being ignored since it's listed in ANSIBLE_BASE_REST_FILTERS_RESERVED_NAMES
probably since LimitPagination
uses limit
as query parameter to limit the output, similar to page_size
.
As a workaround it's possible to filter with a lookup ?limit__exact=localhost
or ?limit__contains=localhost
.
Regards Julian