1

Using airflow version 2.1.2

I'm trying the following API call from the airflow documentation:

ENDPOINT_URL="http://localhost:8080/"
curl -X GET  \
    --user "admin:hello" \
    "${ENDPOINT_URL}/api/v1/pools"

But it's not working for me. The result is following:

{
  "detail": null,
  "status": 401,
  "title": "Unauthorized",
  "type": "https://airflow.apache.org/docs/apache-airflow/2.1.2/stable-rest-api-ref.html#section/Errors/Unauthenticated"
}

I tried the login a few times from the GUI to make sure name and password were right, and they were.

My auth setting:

$ airflow config get-value api auth_backend
airflow.api.auth.backend.basic_auth
Jaroslav Bezděk
  • 6,967
  • 6
  • 29
  • 46
Rick Giuly
  • 983
  • 1
  • 14
  • 19

1 Answers1

3

OK found the issue: Had to restart the airflow webserver for the authentication configuration to take effect.

Rick Giuly
  • 983
  • 1
  • 14
  • 19