Skip to main content

Overview

AWX provides powerful filtering and search capabilities based on Django REST Framework and ansible_base.rest_filters.rest_framework.field_lookup_backend.FieldLookupBackend.

Basic Filtering

Filter resources by field values using query parameters:
string
Filter by exact field value

Field Lookups

Use Django-style field lookups for advanced filtering:

Exact Match

Contains

Starts With / Ends With

Comparisons

In List

Null / Not Null

Boolean Fields

Date/Time Filtering

Many endpoints support full-text search across multiple fields:
Search across multiple fields (name, description, etc.)
The search parameter typically searches:
  • name
  • description
  • Other relevant text fields

Combining Filters

Combine multiple filters using &:

Ordering

Sort results using the order_by parameter:
string
Field name(s) to sort by. Prefix with - for descending order

Common Ordering Fields

Filter by related object fields using double underscores:

Special Filters

Smart Inventory Host Filters

Inventories support complex host filtering:

JSON Field Filtering

Filter on JSON fields (variables, extra_vars, etc.):
JSON field filtering has limitations. Some lookups like __contains may not work with ansible_facts.

Type Filtering

Filter by resource type in unified endpoints:

Examples

Find Failed Jobs from Last Week

Search Job Templates by Name

Find Organizations with Projects

Get Running Jobs

Filter by Multiple Organizations

Find Inventories Without Description

Pagination with Filtering

Filters work seamlessly with pagination:

Discovering Filterable Fields

Use OPTIONS to discover filterable fields:
The response includes:
  • Available filters
  • Search fields
  • Ordering fields

Filter Performance Tips

Filter on indexed fields (id, created, modified, status) for better performance:
Filtering on deeply nested JSON fields can be slow. Use indexed fields when possible.
Prefer specific filters over broad search terms:
When filtering large datasets and iterating, disable counting:

Common Filter Patterns

Active/Recent Resources

User’s Resources

By Organization

Error Responses

Invalid Filter Field

Invalid Lookup