jason810496 commented on code in PR #48855:
URL: https://github.com/apache/airflow/pull/48855#discussion_r2030653204


##########
airflow-ctl/src/airflowctl/api/client.py:
##########
@@ -147,9 +150,19 @@ def auth_flow(self, request: httpx.Request):
 class Client(httpx.Client):
     """Client for the Airflow REST API."""
 
-    def __init__(self, *, base_url: str, token: str, **kwargs: Any):
+    def __init__(
+        self,
+        *,
+        base_url: str,
+        token: str,
+        kind: str = "cli",
+        **kwargs: Any,
+    ) -> None:
         auth = BearerAuth(token)
-        kwargs["base_url"] = f"{base_url}/public"
+        if kind == "auth":
+            kwargs["base_url"] = f"{base_url}/auth"
+        else:
+            kwargs["base_url"] = f"{base_url}/api/v2"

Review Comment:
   It seems like `kind` will currently only be either `cli` or `auth`. Should 
we consider restricting the `kind` to just these values, or are there any other 
use cases where a more flexible `kind` argument would be needed?



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