Re: [PR] AIP 90 within core [airflow]

2025-07-04 Thread via GitHub


Lee-W commented on PR #52868:
URL: https://github.com/apache/airflow/pull/52868#issuecomment-3037859108

   @guan404ming, this is the new draft pr. Ideally, it won't change 
dramatically. I think we could use this to test the frontend, and please let me 
know if there's anything missed. Thanks!


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



Re: [PR] AIP 90 within core [airflow]

2025-07-04 Thread via GitHub


Lee-W commented on PR #52868:
URL: https://github.com/apache/airflow/pull/52868#issuecomment-3037857107

   snippet I used for handy local testing
   
   ```python
   import requests
   
   host = "http://localhost:28080";
   
   token_endpoint = "/auth/token"
   resp = requests.post(f"{host}{token_endpoint}", json={"username": "admin", 
"password": "admin"})
   token = resp.json()["access_token"]
   headers = {"Authorization": f"Bearer {token}"}
 
   get_all_endpoint = "/api/v2/hitl-responses/"
   resp = requests.get(f"{host}{get_all_endpoint}", headers=headers)
   resp.json()
   
   ti_id = <...ti id from the resp above...>
   
   hitl_endpoint = f"/api/v2/hitl-responses/{ti_id}"
   resp = requests.get(f"{host}{hitl_endpoint}", headers=headers)
   resp.json()
   
   data = {"response_content": "Reject"}
   resp = requests.patch(f"{host}{hitl_endpoint}", headers=headers, json=data)
   ```


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