Skip to content

Commit 05a66e7

Browse files
authored
Update API auth. instructions in Docker running docs (#59830)
1 parent 1cda358 commit 05a66e7

File tree

1 file changed

+8
-3
lines changed
  • airflow-core/docs/howto/docker-compose

1 file changed

+8
-3
lines changed

airflow-core/docs/howto/docker-compose/index.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,14 @@ Here is a sample ``curl`` command, which sends a request to retrieve a pool list
295295
.. code-block:: bash
296296
297297
ENDPOINT_URL="http://localhost:8080"
298-
curl -X GET \
299-
--user "airflow:airflow" \
300-
"${ENDPOINT_URL}/api/v1/pools"
298+
JWT_TOKEN=$(curl -s -X POST ${ENDPOINT_URL}/auth/token \
299+
-H "Content-Type: application/json" \
300+
-d '{"username": "airflow", "password": "airflow"}' |\
301+
jq -r '.access_token' \
302+
)
303+
curl -X GET \
304+
"${ENDPOINT_URL}/api/v2/pools" \
305+
-H "Authorization: Bearer ${JWT_TOKEN}"
301306
302307
Cleaning up
303308
===========

0 commit comments

Comments
 (0)