Skip to content

Commit

Permalink
Add docs for replace_microseconds parameters in trigger DAG endpoint …
Browse files Browse the repository at this point in the history
…(#9793)

GitOrigin-RevId: 383b676c5729ef579ab6da420065391182f0f62f
  • Loading branch information
mik-laj authored and Cloud Composer Team committed Sep 12, 2024
1 parent 65ed6fe commit b2cfe04
Showing 1 changed file with 13 additions and 2 deletions.
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

0 comments on commit b2cfe04

Please sign in to comment.