I tried using the below command
curl -X POST
http://localhost:8080/api/experimental/dags/dag_trigger_external_api/dag_runs
H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf":"{\"key\":\"value\"}"}'
I have also installed REST_api plugin inside pulgin folder under airflow_home directory and set rbac=True
I have also inserted below lines of code in airflow.config file
Filters out loading messages from the standard out DEFAULT: True
filter_loading_messages_in_cli_response = True
HTTP Header Name to be used for authenticating REST calls for the REST API Plugin DEFAULT: 'rest_api_plugin_http_token'
rest_api_plugin_http_token_header_name = rest_api_plugin_http_token
HTTP Token to be used for authenticating REST calls for the REST API Plugin DEFAULT: None Comment this out to disable Authentication
rest_api_plugin_expected_http_token = None