amoghrajesh commented on code in PR #43934:
URL: https://github.com/apache/airflow/pull/43934#discussion_r1842471846


##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -303,3 +307,45 @@ def delete_dag(
             status.HTTP_409_CONFLICT, f"Task instances of dag with id: 
'{dag_id}' are still running"
         )
     return Response(status_code=status.HTTP_204_NO_CONTENT)
+
+
+@dags_router.get(
+    "/{dag_id}/assets/queuedEvent",
+    responses=create_openapi_http_exception_doc(
+        [
+            status.HTTP_401_UNAUTHORIZED,
+            status.HTTP_403_FORBIDDEN,
+            status.HTTP_404_NOT_FOUND,
+        ]
+    ),
+)
+def get_dag_asset_queued_events(
+    dag_id: str,
+    session: Annotated[Session, Depends(get_session)],
+    before: str = Query(None),

Review Comment:
   Yep, it works fine.
   
   
![image](https://github.com/user-attachments/assets/902275b3-7d54-4b1f-9384-a4cadfa5320f)
   
   
![image](https://github.com/user-attachments/assets/c8274bbc-3c35-492e-ac67-9d3baadf8d9c)
   



##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -303,3 +307,45 @@ def delete_dag(
             status.HTTP_409_CONFLICT, f"Task instances of dag with id: 
'{dag_id}' are still running"
         )
     return Response(status_code=status.HTTP_204_NO_CONTENT)
+
+
+@dags_router.get(
+    "/{dag_id}/assets/queuedEvent",
+    responses=create_openapi_http_exception_doc(
+        [
+            status.HTTP_401_UNAUTHORIZED,
+            status.HTTP_403_FORBIDDEN,
+            status.HTTP_404_NOT_FOUND,
+        ]
+    ),
+)
+def get_dag_asset_queued_events(
+    dag_id: str,
+    session: Annotated[Session, Depends(get_session)],
+    before: str = Query(None),
+) -> QueuedEventCollectionResponse:
+    """Get queued asset events for a DAG."""
+    where_clause = [AssetDagRunQueue.target_dag_id == dag_id]
+    if before:
+        before_parsed = timezone.parse(before)

Review Comment:
   Tried with Optional as mentioned here 
https://github.com/apache/airflow/pull/43934#discussion_r1842471846



-- 
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]

Reply via email to