pierrejeambrun commented on code in PR #43760:
URL: https://github.com/apache/airflow/pull/43760#discussion_r1832414259
##########
airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -198,3 +198,75 @@ async def get_mapped_task_instance(
)
return TaskInstanceResponse.model_validate(task_instance,
from_attributes=True)
+
+
+@task_instances_router.get(
+ "/",
+ responses=create_openapi_http_exception_doc(
+ [status.HTTP_401_UNAUTHORIZED, status.HTTP_403_FORBIDDEN,
status.HTTP_404_NOT_FOUND]
+ ),
+)
+async def get_task_instances(
+ dag_id: str,
+ dag_run_id: str,
+ request: Request,
+ execution_date_range: Annotated[
+ RangeFilter, Depends(datetime_range_filter_factory("execution_date",
TI))
+ ],
+ start_date_range: Annotated[RangeFilter,
Depends(datetime_range_filter_factory("start_date", TI))],
+ end_date_range: Annotated[RangeFilter,
Depends(datetime_range_filter_factory("end_date", TI))],
+ update_at_range: Annotated[RangeFilter,
Depends(datetime_range_filter_factory("updated_at", TI))],
+ duration_range: Annotated[RangeFilter,
Depends(float_range_filter_factory("duration", TI))],
+ state: QueryTIStateFilter,
+ pool: QueryTIPoolFilter,
+ queue: QueryTIQueueFilter,
+ executor: QueryTIExecutorFilter,
+ limit: QueryLimit,
+ offset: QueryOffset,
+ order_by: Annotated[
+ SortParam,
+ Depends(
+ SortParam(
+ ["id", "state", "duration", "start_date", "end_date",
"map_index"],
Review Comment:
Issue created here, I'm assigned, and can do that then when migration stuffs
are done, I don't want to be too late on that.
Also there are some changes to bring to the common `SortParam` to support
aliasing for `execution_date/logical_date`
--
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]