---
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)
  - `noReuse` boolean — If true, execute eligible build steps without reusing prior materializations
  - `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

---

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