### Description

In the REST API, there is an endpoint to get event (audit) logs. It has sorting and pagination but not filtering. It would be useful to filter by `when` (before and after), `dag_id`, `task_id`,  `owner`, `event`


<img width="891" alt="Screenshot 2023-09-08 at 1 30 35 PM" src="https://github.com/apache/airflow/assets/4600967/4280b9ed-2c73-4a9c-962c-4ede5cb140fe">


### Use case/motivation

_No response_

### Related issues

_No response_

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

#
#
from __future__ import annotations
import pytest
from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
from airflow.models import Log
from airflow.security import permissions
from airflow.utils import timezone
from tests.test_utils.api_connexion_utils import assert_401, create_user, delete_user
from tests.test_utils.config import conf_vars
from tests.test_utils.db import clear_db_logs
@pytest.fixture(scope="module")
def configured_app(minimal_app_for_api):
    app = minimal_app_for_api
    create_user(
        app,  
        username="test",
        role_name="Test",
        permissions=[(permissions.ACTION_CAN_READ, permissions.RESOURCE_AUDIT_LOG)],  
    )
    create_user(app, username="test_no_permissions", role_name="TestNoPermissions")  
    yield app
    delete_user(app, username="test")  
    delete_user(app, username="test_no_permissions")  
@pytest.fixture
def task_instance(session, create_task_instance, request):