Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for replace_microseconds parameters in trigger DAG endpoint #9793

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions docs/rest-api-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,29 @@ Endpoints

Creates a dag_run for a given dag id.
Note: If execution_date is not specified in the body, airflow by default creates only one DAG per second for a given DAG_ID.
In order to create multiple DagRun within one second, execution_date must be specified with the format "YYYY-mm-DDTHH:MM:SS.ssssss".
In order to create multiple DagRun within one second, you should set parameter ``"replace_microseconds"`` to ``"false"`` (boolean as string).

The execution_date must be specified with the format ``YYYY-mm-DDTHH:MM:SS.ssssss``.

**Trigger DAG with config, example:**

.. code-block:: bash

curl -X POST \
http://localhost:8080/api/experimental/dags/<DAG_ID>/dag_runs \
'http://localhost:8080/api/experimental/dags/<DAG_ID>/dag_runs' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{"conf":"{\"key\":\"value\"}"}'

**Trigger DAG with milliseconds precision, example:**

.. code-block:: bash

curl -X POST \
'http://localhost:8080/api/experimental/dags/<DAG_ID>/dag_runs' \
-H 'Content-Type: application/json' \
-H 'Cache-Control: no-cache' \
--data '{"replace_microseconds":"false"}'

.. http:get:: /api/experimental/dags/<DAG_ID>/dag_runs

Expand Down