---
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-26** (v1) `f6dcf7250db7` — 2 info
  - added the optional property `dagRun/allOf[subschema #2]/controllerEvents` to the response with the `200` status
  - added the optional property `dagRun/allOf[subschema #2]/controllerTasks` to the response with the `200` status
- **2026-07-26** (v1) `973f666d7b5a` — 2 info
  - added the optional property `dagRun/allOf[subschema #2]/onInit` to the response with the `200` status
  - added the optional property `dagRun/allOf[subschema #2]/onWait` to the response with the `200` status
- **2026-07-25** (v1) `9adffc836041` — 1 info
  - added the optional property `dagRun/allOf[#/components/schemas/DAGRunSummary]/triggerActor` to the response with the `200` status
- **2026-07-23** (v1) `75b8e91aaf57` — 12 warning, 31 info
  - added the new `conflict` enum value to the `allOf[#/components/schemas/Error]/code` response property for the response status `408`
  - added the new `conflict` enum value to the `code` response property for the response status `400`
  - added the new `conflict` enum value to the `code` response property for the response status `409`
  - added the new `conflict` enum value to the `code` response property for the response status `default`
  - …39 more
- **2026-07-14** (v1) `50a24a9f89b9` — 1 info
  - endpoint deprecated

[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/f6dcf7250db7/schema)
