bugraoz93 commented on code in PR #53800:
URL: https://github.com/apache/airflow/pull/53800#discussion_r2298909609


##########
airflow-ctl/src/airflowctl/api/operations.py:
##########
@@ -545,16 +544,21 @@ def list(
             "end_date": end_date,
             "state": state,
             "limit": limit,
+            "dag_id": dag_id,
         }
-        return super().execute_list(path="dag_runs", 
data_model=DAGRunCollectionResponse, params=params)
+        return super().execute_list(
+            path=f"/dags/{dag_id}/dagRuns", 
data_model=DAGRunCollectionResponse, params=params
+        )
 
-    def create(
+    def trigger(
         self, dag_id: str, trigger_dag_run: TriggerDAGRunPostBody
     ) -> DAGRunResponse | ServerResponseError:
         """Create a dag run."""
         try:
             # It is model_dump_json() because it has unparsable json datetime 
objects
-            self.response = self.client.post(f"dag_runs/{dag_id}", 
json=trigger_dag_run.model_dump_json())
+            self.response = self.client.post(
+                f"/dags/{dag_id}/dagRuns", 
json=trigger_dag_run.model_dump_json()
+            )

Review Comment:
   The PR you have added is updating the Execution API and is internally used 
between TaskSDK and API. This is using the Public (Core) API and can have 
different routing paths as well as params. 
   
https://github.com/apache/airflow/tree/main/airflow-core/src/airflow/api_fastapi/core_api



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