wilsonhooi86 opened a new issue, #39887: URL: https://github.com/apache/airflow/issues/39887
### Apache Airflow version Other Airflow 2 version (please specify below) ### If "Other Airflow 2 version" selected, which one? 2.8.1 ### What happened? MWAA has [announced ](https://aws.amazon.com/blogs/big-data/introducing-amazon-mwaa-support-for-the-airflow-rest-api-and-web-server-auto-scaling/)that we can now use Airflow REST API. The goal is to use [REST API Patch User](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/patch_user) to add/remove users' roles programmatically. MWAA create username with a prefix of `assumed-role/` for each user login. Example {username}: `assumed-role/user1` . API Template URL: https://airflow.apache.org/auth/fab/v1/users/assumed_role/{username} Actual URL: https://airflow.apache.org/auth/fab/v1/users/assumed_role/assumed-role/user1 As we call the Airflow REST API https://airflow.apache.org/auth/fab/v1/users/assumed_role/assumed-role/user1 , it will show below error: ``` { "detail": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.", "status": 404, "title": "Not Found", "type": "about:blank" } ``` We believe the REST API render the slash as an URL path. Question is, can we enhance the Airflow REST API to accept slashes in URL parameter? ### What you think should happen instead? Airflow REST API able to accept slashes in URL parameter. Example: username: `assumed-role/user1` https://airflow.apache.org/auth/fab/v1/users/assumed-role/user1 ### How to reproduce Please refer to What Happened? section ### Operating System MWAA ### Versions of Apache Airflow Providers _No response_ ### Deployment Amazon (AWS) MWAA ### Deployment details I am not sure that this issue is specific to the service provider. ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
