abhishekbhakat opened a new issue, #50160:
URL: https://github.com/apache/airflow/issues/50160

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   OpenAPI spec says `dag_id_pattern` is a query param:
   
   ```json
    {
         "name": "dag_id_pattern",
         "in": "query",
         "required": false,
         "schema": {
             "anyOf": [
                 {
                     "type": "string"
                 },
                 {
                     "type": "null"
                 }
             ],
             "title": "Dag Id Pattern"
         }
     }
   ```
   
   But it only works if we provide as a json body
   
   ### What you think should happen instead?
   
   OpenAPI spec should be corrected
   
   ### How to reproduce
   
   Try below curl commands:
   
   ```
   curl --request GET \
     --url 'http://localhost:8080/api/v2/dags?dag_id_pattern=*' \
     --header 'Authorization: Bearer <token>' \
     --header 'content-type: application/json'
   ```
   
   and 
   
   ```
   curl --request GET \
     --url http://localhost:8080/api/v2/dags \
     --header 'Authorization: Bearer <token>' \
     --header 'content-type: application/json' \
     --data '{
     "dag_id_pattern": "*"
   }'
   ```
   
   
   ### Operating System
   
   ProductName: macOS ProductVersion: 15.4.1 BuildVersion: 24E263
   
   ### Versions of Apache Airflow Providers
   
   Not Applicable
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   Not Applicable
   
   ### Anything else?
   
   Not Applicable
   
   ### Are you willing to submit PR?
   
   - [x] 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]

Reply via email to