pierrejeambrun commented on code in PR #43407:
URL: https://github.com/apache/airflow/pull/43407#discussion_r1828943782
##########
airflow/api_fastapi/core_api/routes/public/event_logs.py:
##########
@@ -49,3 +58,86 @@ async def get_event_log(
event_log,
from_attributes=True,
)
+
+
+@event_logs_router.get("/", responses=create_openapi_http_exception_doc([401,
403]))
+async def get_event_logs(
+ limit: QueryLimit,
+ offset: QueryOffset,
+ session: Annotated[Session, Depends(get_session)],
+ order_by: Annotated[
+ SortParam,
+ Depends(
+ SortParam(
+ [
+ "id", # event_log_id
+ "dttm", # when
+ "dag_id",
+ "task_id",
+ "run_id",
+ "event",
+ "execution_date", # logical_date
+ "owner",
+ "extra",
+ ],
+ Log,
+ ).dynamic_depends()
+ ),
+ ],
+ dag_id: str | None = None,
+ task_id: str | None = None,
+ run_id: str | None = None,
+ map_index: int | None = None,
+ try_number: int | None = None,
+ owner: str | None = None,
+ event: str | None = None,
+ excluded_events: list[str] | None = Query(None),
+ included_events: list[str] | None = Query(None),
+ before: datetime | None = None,
+ after: datetime | None = None,
Review Comment:
Also just noticing that if those query parameters are really specific to
this endpoint, and not really re-usable, we can just leave them like this, and
don't bother putting them in the common reusable `parameters.py` file.
Because most of them (maybe all of them), no other endpoints will re-use
them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]