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

API filter limit on /api/v2/jobs/ not working #15813

Open
6 of 11 tasks
kerhac opened this issue Feb 5, 2025 · 0 comments
Open
6 of 11 tasks

API filter limit on /api/v2/jobs/ not working #15813

kerhac opened this issue Feb 5, 2025 · 0 comments

Comments

@kerhac
Copy link

kerhac commented Feb 5, 2025

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

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

No branches or pull requests

1 participant