---
title: "Execute DAG synchronously and wait for completion"
method: POST
path: "/dags/{fileName}/start-sync"
tags: ["dags"]
deprecated: true
---

# Execute DAG synchronously and wait for completion

`POST /dags/{fileName}/start-sync`

> **Deprecated.**

**Deprecated:** Use `POST /dags/{fileName}/start`, then monitor the DAG run through the DAG-run status API or SSE.

Creates a DAG-run from the DAG definition, starts its execution, waits for it to complete (or timeout), and returns the full execution details including node statuses.

**Important behaviors:**
- If the timeout is exceeded, the DAG run continues executing in the background. The 408 response includes the `dagRunId` so clients can monitor or cancel the run.
- If the DAG reaches a 'waiting' status (human-in-the-loop approval needed), the endpoint returns immediately with 200 and the current status.

## Path parameters

- `fileName` string, regex, required — Name of the DAG file

## Query parameters

- `remoteNode` string

## Request body

- object
  - `params` string — Parameters to pass to the DAG-run in JSON format
  - `dagRunId` string — Optional ID for the DAG-run, if not provided a new one will be generated
  - `dagName` string — Optional DAG name override to use for the created dag-run
  - `profile` string — Runtime profile override. Empty string means no profile.
  - `singleton` boolean — If true, prevent starting if DAG is already running (returns 409 conflict)
  - `labels` string[] — Additional labels to apply to the DAG-run (format: key=value or key-only). Merged with labels defined in the DAG spec. Mutually exclusive with deprecated `tags`; the server returns HTTP 400 if both are set.
  - `tags` string[] — Deprecated alias for Labels. Additional labels to apply to the DAG-run (format: key=value or key-only). Merged with labels defined in the DAG spec. Mutually exclusive with `labels`; the server returns HTTP 400 if both are set.
  - `timeout` integer, required — Maximum seconds to wait for DAG execution to complete (required)

## Response `200`

DAG-run completed (or reached waiting status)

- object
  - `dagRun` DAGRunDetails, required — unresolved $ref

## Other responses

- `400` — Invalid request parameters or labels
- `408` — Timeout waiting for DAG execution to complete. The DAG run continues executing in the background.
- `409` — DAG is already running (singleton mode) or dagRunId already exists
- `default` — Generic error response

## Changes

- **2026-07-14** (v1) `50a24a9f89b9` — 1 info
  - endpoint deprecated
- **2026-07-09** (v1) `9d0cf8f4b61c` — 11 breaking, 11 info
  - the response property `dagRun/allOf[subschema #2]/nodes/items/step/preconditions/items/condition` became optional for the status `200`
  - the response property `dagRun/allOf[subschema #2]/nodes/items/step/repeatPolicy/condition/condition` became optional for the status `200`
  - the response property `dagRun/allOf[subschema #2]/onAbort/step/preconditions/items/condition` became optional for the status `200`
  - the response property `dagRun/allOf[subschema #2]/onAbort/step/repeatPolicy/condition/condition` became optional for the status `200`
  - …18 more
- **2026-07-01** (v1) `c38bc1efbea3` — 1 info
  - added the optional property `dagRun/allOf[#/components/schemas/DAGRunSummary]/conditions` to the response with the `200` status
- **2026-06-18** (v1) `162df20bbef8` — 5 info
  - added the optional property `dagRun/allOf[subschema #2]/nodes/items/step/outputs` to the response with the `200` status
  - added the optional property `dagRun/allOf[subschema #2]/onAbort/step/outputs` to the response with the `200` status
  - added the optional property `dagRun/allOf[subschema #2]/onExit/step/outputs` to the response with the `200` status
  - added the optional property `dagRun/allOf[subschema #2]/onFailure/step/outputs` to the response with the `200` status
  - …1 more
- …earlier changes not shown

[Full history](https://skmtc.dev/dagucloud/apis/dagu/changes/dags/:fileName/start-sync/post.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) · [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/6a8a215a502c/schema)
