[
https://issues.apache.org/jira/browse/AIRFLOW-6741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
raj ram updated AIRFLOW-6741:
-
Description:
Per [https://airflow.apache.org/docs/1.10.1/api.html], I should be able to
start a DAG through a POST call. But I am not able to POST a request to
airflow 1.10.1 to start a DAG. When I did a POST using CURL
curl -X POST [http://localhost:8080/api/experimental/dags/]/dag_runs -H
'Cache-Control: no-cache' -H 'Content-Type: application/json' -d {}
I got this error. curl: (52) Empty reply from server
I was able to POST to other REST endpoints. Also, I am able to POST to airflow
version 1.10.5 using the exact same command.
Here is the airflow.cfg API setting
[cli]
# In what way should the cli access the API. The LocalClient will use the
# database directly, while the json_client will use the api running on the
# webserver
api_client = airflow.api.client.local_client
# If you set web_server_url_prefix, do NOT forget to append it here, ex:
# endpoint_url = [http://localhost:8080/myroot]
# So api will look like: [http://localhost:8080/myroot/api/experimental/]...
endpoint_url = [http://localhost:$AIRFLOW_PORT|http://localhost:$AIRFLOW_PORT/]
[api]
# How to authenticate users of the API
auth_backend = airflow.api.auth.backend.default
was:
Per [https://airflow.apache.org/docs/1.10.1/api.html], I should be able to
start a DAG through a POST call
I am not able to POST a request to airflow 1.10.1 to start a DAG. When I did a
POST using CURL
curl -X POST [http://localhost:8080/api/experimental/dags/]/dag_runs -H
'Cache-Control: no-cache' -H 'Content-Type: application/json' -d {}
I got this error. curl: (52) Empty reply from server
I was able to POST to other REST endpoints. Also, I am able to POST to airflow
version 1.10.5 using the exact same command.
Here is the airflow.cfg API setting
[cli]
# In what way should the cli access the API. The LocalClient will use the
# database directly, while the json_client will use the api running on the
# webserver
api_client = airflow.api.client.local_client
# If you set web_server_url_prefix, do NOT forget to append it here, ex:
# endpoint_url = [http://localhost:8080/myroot]
# So api will look like: [http://localhost:8080/myroot/api/experimental/]...
endpoint_url = [http://localhost:$AIRFLOW_PORT|http://localhost:$AIRFLOW_PORT/]
[api]
# How to authenticate users of the API
auth_backend = airflow.api.auth.backend.default
> Cant run DAG using REST api POST call
> -
>
> Key: AIRFLOW-6741
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6741
> Project: Apache Airflow
> Issue Type: Bug
> Components: api
>Affects Versions: 1.10.1
> Environment: AWS Linux 1
>Reporter: raj ram
>Priority: Major
>
> Per [https://airflow.apache.org/docs/1.10.1/api.html], I should be able to
> start a DAG through a POST call. But I am not able to POST a request to
> airflow 1.10.1 to start a DAG. When I did a POST using CURL
> curl -X POST [http://localhost:8080/api/experimental/dags/]/dag_runs
> -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d {}
>
> I got this error. curl: (52) Empty reply from server
>
> I was able to POST to other REST endpoints. Also, I am able to POST to
> airflow version 1.10.5 using the exact same command.
>
> Here is the airflow.cfg API setting
>
> [cli]
> # In what way should the cli access the API. The LocalClient will use the
> # database directly, while the json_client will use the api running on the
> # webserver
> api_client = airflow.api.client.local_client
> # If you set web_server_url_prefix, do NOT forget to append it here, ex:
> # endpoint_url = [http://localhost:8080/myroot]
> # So api will look like: [http://localhost:8080/myroot/api/experimental/]...
> endpoint_url =
> [http://localhost:$AIRFLOW_PORT|http://localhost:$AIRFLOW_PORT/]
> [api]
> # How to authenticate users of the API
> auth_backend = airflow.api.auth.backend.default
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)